2020-11-06 13:04:25 +01:00
|
|
|
#ifndef __KOLIBRI_HEAP_H_INCLUDED_
|
|
|
|
#define __KOLIBRI_HEAP_H_INCLUDED_
|
|
|
|
|
|
|
|
#include "kolibri.h"
|
|
|
|
#include "memheap.h"
|
|
|
|
|
|
|
|
// Kolibri memory heap interface.
|
|
|
|
|
|
|
|
namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
|
|
|
|
{
|
2020-11-12 17:00:31 +01:00
|
|
|
long _HeapInit()
|
2020-11-06 13:04:25 +01:00
|
|
|
{
|
2020-11-12 17:00:31 +01:00
|
|
|
return MemoryHeap::mem_Init();
|
2020-11-06 13:04:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void *Alloc(unsigned int size)
|
|
|
|
{
|
2020-11-12 17:00:31 +01:00
|
|
|
return MemoryHeap::mem_Alloc(size);
|
2020-11-06 13:04:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void *ReAlloc(void *mem, unsigned int size)
|
|
|
|
{
|
2020-11-12 17:00:31 +01:00
|
|
|
return MemoryHeap::mem_ReAlloc(size, mem);
|
2020-11-06 13:04:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void Free(void *mem)
|
|
|
|
{
|
2020-11-12 17:00:31 +01:00
|
|
|
MemoryHeap::mem_Free(mem);
|
2020-11-06 13:04:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // ndef __KOLIBRI_HEAP_H_INCLUDED_
|