mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fixed custom allocators when recording >1 allocation stack depth
This commit is contained in:
parent
7b8251c311
commit
973b5e73cf
1 changed files with 21 additions and 1 deletions
|
@ -51,8 +51,10 @@ namespace System
|
|||
public static extern void ObjectDynCheck(Object obj, int32 typeId, bool allowNull);
|
||||
public static extern void ObjectDynCheckFailed(Object obj, int32 typeId);
|
||||
public static extern void Dbg_ObjectCreated(Object obj, int size, ClassVData* classVData);
|
||||
public static extern void Dbg_ObjectCreatedEx(Object obj, int size, ClassVData* classVData);
|
||||
public static extern void Dbg_ObjectAllocated(Object obj, int size, ClassVData* classVData);
|
||||
public static extern int Dbg_PrepareStackTrace(int maxDepth);
|
||||
public static extern void Dbg_ObjectAllocatedEx(Object obj, int size, ClassVData* classVData);
|
||||
public static extern int Dbg_PrepareStackTrace(int baseAllocSize, int maxStackTraceDepth);
|
||||
public static extern void Dbg_ObjectStackInit(Object object, ClassVData* classVData);
|
||||
public static extern Object Dbg_ObjectAlloc(TypeInstance typeInst, int size);
|
||||
public static extern Object Dbg_ObjectAlloc(ClassVData* classVData, int size, int align, int maxStackTraceDepth);
|
||||
|
@ -250,4 +252,22 @@ namespace System
|
|||
extern static this();
|
||||
extern static ~this();
|
||||
}
|
||||
|
||||
struct CRTAlloc
|
||||
{
|
||||
public void* Alloc(int size, int align)
|
||||
{
|
||||
return Internal.StdMalloc(size);
|
||||
}
|
||||
|
||||
public void Free(void* ptr)
|
||||
{
|
||||
Internal.StdFree(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
public static CRTAlloc gCRTAlloc;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue