mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 23:56:05 +02:00
22 lines
301 B
Beef
22 lines
301 B
Beef
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;
|
|
}
|
|
}
|
|
}
|