2024-02-18 00:18:23 +01:00
|
|
|
#include <memory.h>
|
|
|
|
|
2024-02-18 01:20:00 +01:00
|
|
|
void *
|
2024-02-18 14:40:09 +01:00
|
|
|
malloc(s32 size)
|
2024-02-18 01:20:00 +01:00
|
|
|
{
|
|
|
|
s32 actual_size = size + sizeof(s32) + sizeof(void *);
|
2024-02-18 14:40:09 +01:00
|
|
|
|
2024-02-18 01:20:00 +01:00
|
|
|
if (start == NULL) {
|
|
|
|
start = (void *) START;
|
|
|
|
|
|
|
|
start[0] = '\0';
|
|
|
|
start[1] = '\0';
|
|
|
|
start[2] = '\0';
|
|
|
|
start[3] = '\0';
|
|
|
|
|
|
|
|
SIZE(m) = size;
|
2024-02-18 14:40:09 +01:00
|
|
|
|
2024-02-18 01:20:00 +01:00
|
|
|
return USABLE(m);
|
2024-02-18 14:40:09 +01:00
|
|
|
}
|
2024-02-18 01:20:00 +01:00
|
|
|
|
|
|
|
/* TODO */
|
2024-02-18 14:40:09 +01:00
|
|
|
}
|