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