MCPcopy Create free account
hub / github.com/beefytech/Beef / Malloc

Method Malloc

BeefRT/rt/Internal.cpp:488–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488void* Internal::Malloc(intptr length)
489{
490#if BF_USE_STOMP_ALLOC
491 return StompAlloc(length);
492#elif BF_TRACK_SIZES
493 uint8* allocPtr = (uint8*)malloc(length + 16);
494 *((int*)allocPtr) = length;
495 sAllocSizes[0] += length;
496 return allocPtr + 16;
497#else
498 return malloc(length);
499#endif
500}
501
502void* Internal::VirtualAlloc(intptr size, bool canExecute, bool canWrite)
503{

Callers

nothing calls this directly

Calls 2

StompAllocFunction · 0.70
mallocFunction · 0.50

Tested by

no test coverage detected