mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Add StompAlloc workspace alloc option
This commit is contained in:
parent
949bc209d3
commit
a77a95b71b
7 changed files with 40 additions and 13 deletions
|
@ -740,7 +740,7 @@ namespace IDE
|
|||
outRt.Append(dynName ? ".dll" : ".lib");
|
||||
}
|
||||
|
||||
if ((workspaceOptions.mEnableObjectDebugFlags) || (workspaceOptions.mAllocType == .Debug))
|
||||
if ((workspaceOptions.mEnableObjectDebugFlags) || (workspaceOptions.mAllocType == .Debug) || (workspaceOptions.mAllocType == .Stomp))
|
||||
{
|
||||
outDbg.Append("Beef", IDEApp.sRTVersionStr, "Dbg");
|
||||
outDbg.Append((Workspace.PlatformType.GetPtrSizeByName(gApp.mPlatformName) == 4) ? "32" : "64");
|
||||
|
|
|
@ -745,6 +745,9 @@ namespace IDE.Compiler
|
|||
optionFlags |= .DebugAlloc;
|
||||
mallocLinkName = "";
|
||||
freeLinkName = "";
|
||||
case .Stomp:
|
||||
mallocLinkName = "StompAlloc";
|
||||
freeLinkName = "StompFree";
|
||||
case .CRT:
|
||||
mallocLinkName = "malloc";
|
||||
freeLinkName = "free";
|
||||
|
|
|
@ -215,6 +215,7 @@ namespace IDE
|
|||
public enum AllocType
|
||||
{
|
||||
Debug,
|
||||
Stomp,
|
||||
CRT,
|
||||
JEMalloc,
|
||||
TCMalloc,
|
||||
|
|
|
@ -733,7 +733,8 @@ namespace IDE.ui
|
|||
AddPropertiesItem(category, "Preprocessor Macros", "mPreprocessorMacros");
|
||||
AddPropertiesItem(category, "Incremental Build", "mIncrementalBuild");
|
||||
AddPropertiesItem(category, "Intermediate Type", "mIntermediateType");
|
||||
var (allocCategory, allocPropEntry) = AddPropertiesItem(category, "Memory Allocator", "mAllocType");
|
||||
var (allocCategory, allocPropEntry) = AddPropertiesItem(category, "Memory Allocator", "mAllocType",
|
||||
scope String[] ("Debug", "Stomp (Debug)", "CRT", "JEMalloc", "TCMalloc"));
|
||||
var (mallocItem, mallocPropEntry) = AddPropertiesItem(allocCategory, "Malloc", "mAllocMalloc");
|
||||
var (freeItem, freePropEntry) = AddPropertiesItem(allocCategory, "Free", "mAllocFree");
|
||||
allocPropEntry.mOnUpdate.Add(new () =>
|
||||
|
@ -758,6 +759,11 @@ namespace IDE.ui
|
|||
mallocSubItem.Label = "";
|
||||
freeSubItem.Label = "";
|
||||
}
|
||||
else if (allocType == .Stomp)
|
||||
{
|
||||
mallocSubItem.Label = "StompAlloc";
|
||||
freeSubItem.Label = "StompFree";
|
||||
}
|
||||
else if (allocType == .CRT)
|
||||
{
|
||||
mallocSubItem.Label = "malloc";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue