very simple heap management.
This will help to more easily optimize heap management later on
This commit is contained in:
parent
a7db3b5edd
commit
3b5c5e5f94
17
System Abstraction/win32/cdb_memroy.c
Normal file
17
System Abstraction/win32/cdb_memroy.c
Normal file
@ -0,0 +1,17 @@
|
||||
#include "../cdb_Sustem.h"
|
||||
#include <windows.h>
|
||||
|
||||
// returns NULL, if there is no memroy left or an error occured
|
||||
void * sus_heapAlloc(size_t bytes){
|
||||
return HeapAlloc(GetProcessHeap(), 0, bytes); //generic call to the windows heapAlloc function
|
||||
}
|
||||
|
||||
// returns NULL, if there is no memroy left or an error occured
|
||||
void * sus_heapResize(void * memroy, size_t newBytes){
|
||||
HeapReAlloc(GetProcessHeap(), 0, memroy, newBytes);
|
||||
}
|
||||
|
||||
// what should this function do, if an error occurse..
|
||||
void sus_heapFree(void * memroy){
|
||||
HeapFree(GetProcessHeap(), 0, memroy);
|
||||
}
|
Loading…
Reference in New Issue
Block a user