omos-tcnj2024/sys/memory.c

19 lines
232 B
C
Raw Normal View History

2024-02-18 00:18:23 +01:00
#include <memory.h>
2024-02-18 15:14:47 +01:00
#include <types.h>
2024-02-18 00:18:23 +01:00
2024-02-18 15:14:47 +01:00
u32 curr = START;
2024-02-18 14:40:09 +01:00
2024-02-18 17:22:04 +01:00
void
2024-02-18 17:03:57 +01:00
memory_init(void)
2024-02-18 17:22:04 +01:00
{
2024-02-18 17:03:57 +01:00
u32 esp, ebp;
2024-02-18 17:14:38 +01:00
ebp = STACK_START;
esp = STACK_START;
2024-02-18 17:22:04 +01:00
}
2024-02-18 17:03:57 +01:00
2024-02-18 15:14:47 +01:00
void *malloc(s32 size) {
u32 addr = curr;
curr += size;
return (void*)addr;
2024-02-18 16:30:09 +01:00
}