platform can now properly return larger amounts of memory as requested

This commit is contained in:
2026-06-08 20:29:45 +02:00
parent 57ce5af8e6
commit d0e6bccafe
3 changed files with 26 additions and 18 deletions

View File

@@ -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;