mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-05 11:27:09 +00:00
heap: Add heap object copy
This commit is contained in:
parent
9489eca487
commit
f5092bc981
@ -128,6 +128,11 @@ void heap_init(u32 base)
|
||||
_heap_create(&_heap, base);
|
||||
}
|
||||
|
||||
void heap_copy(heap_t *heap)
|
||||
{
|
||||
memcpy(&_heap, heap, sizeof(heap_t));
|
||||
}
|
||||
|
||||
void *malloc(u32 size)
|
||||
{
|
||||
return (void *)_heap_alloc(&_heap, size);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "../../common/common_heap.h"
|
||||
|
||||
void heap_init(u32 base);
|
||||
void heap_copy(heap_t *heap);
|
||||
void *malloc(u32 size);
|
||||
void *calloc(u32 num, u32 size);
|
||||
void free(void *buf);
|
||||
|
@ -128,6 +128,11 @@ void heap_init(u32 base)
|
||||
_heap_create(&_heap, base);
|
||||
}
|
||||
|
||||
void heap_copy(heap_t *heap)
|
||||
{
|
||||
memcpy(&_heap, heap, sizeof(heap_t));
|
||||
}
|
||||
|
||||
void *malloc(u32 size)
|
||||
{
|
||||
return (void *)_heap_alloc(&_heap, size);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "../../../common/common_heap.h"
|
||||
|
||||
void heap_init(u32 base);
|
||||
void heap_copy(heap_t *heap);
|
||||
void *malloc(u32 size);
|
||||
void *calloc(u32 num, u32 size);
|
||||
void free(void *buf);
|
||||
|
Loading…
Reference in New Issue
Block a user