MCPcopy Create free account
hub / github.com/Pierre-Terdiman/PEEL / mallocDebug

Method mallocDebug

PEEL/Physics/PINT_Common/PINT_Common.cpp:132–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void* MyIceAllocator::mallocDebug(size_t size, const char* filename, udword line, const char* class_name, MemoryType type, bool from_new)
133{
134 mCurrentNbAllocs++;
135// return ::malloc(size);
136// return _aligned_malloc(size, 16);
137
138 MemHeader* Header = (MemHeader*)_aligned_malloc(size+sizeof(MemHeader), 16);
139 Header->mName = mName;
140 Header->mCheckValue = 0x12345678;
141 Header->mSize = size;
142 mUsedMemory += size;
143 return Header+1;
144}
145
146void* MyIceAllocator::realloc(void* memory, size_t size)
147{

Callers 2

operator newFunction · 0.45
operator new[]Function · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected