I have a code and It gives me some numbers. I don't know what do these numbers mean. I am curious, what these numbers mean. Thank you for your answer!
procedure usdmem(var stradd,stpadd:array of Integer);
var
st: TMemoryManagerState;
sb: TSmallBlockTypeState;
i:Integer;
begin
GetMemoryManagerState(st);
i:=0;
for sb in st.SmallBlockTypeStates do
begin
stradd[i]:=sb.ReservedAddressSpace;
stpadd[i]:=stradd[i]+sb.UseableBlockSize*8;
inc(i);
end;
end;
//-----------------------------------
usdmem(stradd,stpadd);
for I := 0 to 10 do
begin
Write(inttostr(stradd[I]));
Write(' - ');
WriteLn(inttostr(stpadd[I]));
end;
The information can be found in the program documentation: TMemoryManagerState. And there's more information available in a number of topics index from Memory Management Index.
If you want to really understand how FastMM works, then you should download and read the source. For example, that defines TSmallBlockTypeState like so:
TSmallBlockTypeState = record
{The internal size of the block type}
InternalBlockSize: Cardinal;
{Useable block size: The number of non-reserved bytes inside the block.}
UseableBlockSize: Cardinal;
{The number of allocated blocks}
AllocatedBlockCount: NativeUInt;
{The total address space reserved for this block type (both allocated and
free blocks)}
ReservedAddressSpace: NativeUInt;
end;
As you can see, the comments document the record's fields.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With