mirror of
https://github.com/ToyB-Chan/minimal-heap.git
synced 2026-07-13 21:51:16 +02:00
platform can now properly return larger amounts of memory as requested
This commit is contained in:
@@ -7,14 +7,15 @@
|
||||
|
||||
#define USE_MALLOC 0
|
||||
|
||||
//#define MIHP_ValidateHeap()
|
||||
#define MIHP_ValidateHeap()
|
||||
|
||||
void* MIHP_PlatformRequestMemory(size_t size)
|
||||
void* MIHP_PlatformRequestMemory(size_t minRequestedSize, size_t* outActualSize)
|
||||
{
|
||||
return malloc(size);
|
||||
*outActualSize = minRequestedSize;
|
||||
return malloc(minRequestedSize);
|
||||
}
|
||||
|
||||
bool MIHP_PlatformFreeMemory(void* ptr, size_t size)
|
||||
bool MIHP_PlatformFreeMemory(void* ptr, size_t actualSize)
|
||||
{
|
||||
free(ptr);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user