git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make dmm.c portable
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
mm
/
dmm.h
diff --git
a/lunaix-os/includes/lunaix/mm/dmm.h
b/lunaix-os/includes/lunaix/mm/dmm.h
index e8c3b6fa43a8697b05d55d0f37e3dff0aef47ffd..cfe15b3bfdce3d5578624c34d8ce4484238eba6e 100644
(file)
--- a/
lunaix-os/includes/lunaix/mm/dmm.h
+++ b/
lunaix-os/includes/lunaix/mm/dmm.h
@@
-6,16
+6,23
@@
#define HEAP_INIT_SIZE 4096
#define HEAP_INIT_SIZE 4096
+typedef struct
+{
+ void* start;
+ void* brk;
+} heap_context_t;
+
+
int
int
-dmm_init();
+dmm_init(
heap_context_t* heap
);
int
int
-lxsbrk(void* addr);
+lxsbrk(
heap_context_t* heap,
void* addr);
void*
void*
-lxbrk(size_t size);
+lxbrk(
heap_context_t* heap,
size_t size);
void*
void*
-lx_malloc(size_t size);
+lx_malloc(
heap_context_t* heap,
size_t size);
void
lx_free(void* ptr);
void
lx_free(void* ptr);