XenevaOS
Loading...
Searching...
No Matches
liballoc.h
Go to the documentation of this file.
1
30#ifndef _LIBALLOC_H
31#define _LIBALLOC_H
32
33#include <stdint.h>
34#include <aurora.h>
35
36
37#ifdef __cplusplus
39#endif
40
41
49 {
50 unsigned int magic; //< It's a kind of ...
51 unsigned int size; //< Requested size.
52 unsigned int real_size; //< Actual size.
53 int index; //< Location in the page table.
54
55 struct boundary_tag *split_left; //< Linked-list info for broken pages.
56 struct boundary_tag *split_right; //< The same.
57
58 struct boundary_tag *next; //< Linked list info.
59 struct boundary_tag *prev; //< Linked list info.
60 };
61
62
70 int liballoc_lock();
71
78 int liballoc_unlock();
79
87 void* liballoc_alloc(int);
88
97 int liballoc_free(void*, int);
98
99 void *port_malloc(unsigned int); //< The standard function.
100 void *port_realloc(void *, unsigned int); //< The standard function.
101 void *port_calloc(unsigned long long, unsigned long long); //< The standard function.
102 void port_free(void *); //< The standard function.
103
104
105#ifdef __cplusplus
106}
107#endif
108
109#endif
110
111
#define AU_EXTERN
Definition aurora.h:50
void port_free(void *)
Definition liballoc.cpp:424
int liballoc_free(void *, int)
Definition liballoc.cpp:588
void * port_calloc(unsigned long long, unsigned long long)
Definition liballoc.cpp:518
void * port_malloc(unsigned int)
Definition liballoc.cpp:313
int liballoc_lock()
Definition liballoc.cpp:561
void * port_realloc(void *, unsigned int)
Definition liballoc.cpp:534
int liballoc_unlock()
Definition liballoc.cpp:566
void * liballoc_alloc(int)
Definition liballoc.cpp:570
Definition liballoc.h:49
struct boundary_tag * split_right
Definition liballoc.h:56
unsigned int size
Definition liballoc.h:51
struct boundary_tag * next
Definition liballoc.h:58
struct boundary_tag * split_left
Definition liballoc.h:55
unsigned int magic
Definition liballoc.h:50
struct boundary_tag * prev
Definition liballoc.h:59
unsigned int real_size
Definition liballoc.h:52
int index
Definition liballoc.h:53