1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-18 08:06:04 +02:00
Beef/IDEHelper/Tests/src/TrackedAlloc.bf

23 lines
301 B
Beef
Raw Normal View History

2019-08-23 11:56:54 -07:00
using System;
namespace Tests
{
class TrackedAlloc
{
public int mLastAllocSize;
public void* Alloc(int size, int align)
{
mLastAllocSize = size;
let ptr = new uint8[size]*;
Internal.MemSet(ptr, 0, size);
return ptr;
}
public void Free(void* ptr)
{
delete ptr;
}
}
}