Initial aurora setup, doesn't build yet

This commit is contained in:
dbalatoni13 2025-04-02 04:17:26 +02:00
parent ba0d7ef58c
commit 2509e01125
18 changed files with 430 additions and 9 deletions

View file

@ -137,6 +137,9 @@ static long DLSize(struct Cell *list)
void *OSAllocFromHeap(int heap, unsigned long size)
{
#ifdef TARGET_PC
return malloc(size);
#endif
struct HeapDesc *hd;
struct Cell *cell;
struct Cell *newCell;
@ -297,6 +300,9 @@ void *OSAllocFixed(void **rstart, void **rend)
void OSFreeToHeap(int heap, void *ptr)
{
#ifdef TARGET_PC
free(ptr);
#else
struct HeapDesc *hd;
struct Cell *cell;
@ -310,6 +316,7 @@ void OSFreeToHeap(int heap, void *ptr)
ASSERTMSG1(0x247, DLLookup(hd->allocated, cell), "OSFreeToHeap(): invalid pointer.");
hd->allocated = DLExtract(hd->allocated, cell);
hd->free = DLInsert(hd->free, cell);
#endif
}
int OSSetCurrentHeap(int heap)