⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fastmmdebugsupport.pas

📁 高效的内存管理开源项目,完全取代BorladMM的内存管理
💻 PAS
字号:
{

Fast Memory Manager: FullDebugMode Borlndmm.dll support unit

If you use the replacement Borlndmm.dll compiled in FullDebugMode, and you need
 access to some of the extended functionality that is not imported by
 sharemem.pas, then you may use this unit to get access to it. Please note that
 you will still need to add sharemem.pas as the first unit in the "uses"
 section of the .dpr, and the FastMM_FullDebugMode.dll must be available on the
 path. Also, the borlndmm.dll that you will be using *must* be compiled using
 FullDebugMode.}

unit FastMMDebugSupport;

interface

{Specify the full path and name for the filename to be used for logging memory
 errors, etc. If ALogFileName is nil or points to an empty string it will
 revert to the default log file name.}
procedure SetMMLogFileName(ALogFileName: PChar = nil);
{Returns the current "allocation group". Whenever a GetMem request is serviced
 in FullDebugMode, the current "allocation group" is stored in the block header.
 This may help with debugging. Note that if a block is subsequently reallocated
 that it keeps its original "allocation group" and "allocation number" (all
 allocations are also numbered sequentially).}
function GetCurrentAllocationGroup: Cardinal;
{Allocation groups work in a stack like fashion. Group numbers are pushed onto
 and popped off the stack. Note that the stack size is limited, so every push
 should have a matching pop.}
procedure PushAllocationGroup(ANewCurrentAllocationGroup: Cardinal);
procedure PopAllocationGroup;
{Logs detail about currently allocated memory blocks for the specified range of
 allocation groups. if ALastAllocationGroupToLog is less than
 AFirstAllocationGroupToLog or it is zero, then all allocation groups are
 logged. This routine also checks the memory pool for consistency at the same
 time.}
procedure LogAllocatedBlocksToFile(AFirstAllocationGroupToLog, ALastAllocationGroupToLog: Cardinal);

implementation

const
  borlndmm = 'borlndmm.dll';

procedure SetMMLogFileName; external borlndmm;
function GetCurrentAllocationGroup; external borlndmm;
procedure PushAllocationGroup; external borlndmm;
procedure PopAllocationGroup; external borlndmm;
procedure LogAllocatedBlocksToFile; external borlndmm;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -