2020-11-10 15:19:15 +03:00
|
|
|
#ifndef __KOLIBRI_HEAP_H_INCLUDED_
|
|
|
|
#define __KOLIBRI_HEAP_H_INCLUDED_
|
2011-01-28 16:00:06 +03:00
|
|
|
|
2020-11-13 14:22:40 +03:00
|
|
|
#include "kolibri.h"
|
|
|
|
#include "memheap.h"
|
2011-01-28 16:00:06 +03:00
|
|
|
|
2020-11-02 21:44:51 +03:00
|
|
|
// Kolibri memory heap interface.
|
2011-01-28 16:00:06 +03:00
|
|
|
|
2020-11-02 21:44:51 +03:00
|
|
|
namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
|
2011-01-28 16:00:06 +03:00
|
|
|
{
|
2020-11-13 14:22:40 +03:00
|
|
|
long _HeapInit()
|
2011-01-28 16:00:06 +03:00
|
|
|
{
|
2020-11-13 14:22:40 +03:00
|
|
|
return MemoryHeap::mem_Init();
|
2011-01-28 16:00:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void *Alloc(unsigned int size)
|
|
|
|
{
|
2020-11-13 14:22:40 +03:00
|
|
|
return MemoryHeap::mem_Alloc(size);
|
2011-01-28 16:00:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void *ReAlloc(void *mem, unsigned int size)
|
|
|
|
{
|
2020-11-13 14:22:40 +03:00
|
|
|
return MemoryHeap::mem_ReAlloc(size, mem);
|
2011-01-28 16:00:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void Free(void *mem)
|
|
|
|
{
|
2020-11-13 14:22:40 +03:00
|
|
|
MemoryHeap::mem_Free(mem);
|
2011-01-28 16:00:06 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-10 15:19:15 +03:00
|
|
|
#endif // ndef __KOLIBRI_HEAP_H_INCLUDED_
|