Re: Class Size Creation Statistics
- From: "Pierre le Riche" <pleriche@xxxxxxxxxxx>
- Date: Thu, 6 Oct 2005 16:59:56 +0200
Hi Eric,
> To Pierre: I haven't investigated FastMM in this direction, but would that
> kind of stats be readily/easily available already in FastMM?
You can take a snapshot of the number of blocks allocated for every block
size. The function is called "GetMemoryManagerState":
procedure GetMemoryManagerState(var AMemoryManagerState:
TMemoryManagerState);
type
TSmallBlockTypeState = packed 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: Cardinal;
{The total address space reserved for this block type (both allocated
and
free blocks)}
ReservedAddressSpace: Cardinal;
end;
TSmallBlockTypeStates = array[0..NumSmallBlockTypes - 1] of
TSmallBlockTypeState;
TMemoryManagerState = packed record
{Small block type states}
SmallBlockTypeStates: TSmallBlockTypeStates;
{Medium block stats}
AllocatedMediumBlockCount: Cardinal;
TotalAllocatedMediumBlockSize: Cardinal;
ReservedMediumBlockAddressSpace: Cardinal;
{Large block stats}
AllocatedLargeBlockCount: Cardinal;
TotalAllocatedLargeBlockSize: Cardinal;
ReservedLargeBlockAddressSpace: Cardinal;
end;
Regards,
Pierre
.
- Follow-Ups:
- Re: Class Size Creation Statistics
- From: Eric Grange
- Re: Class Size Creation Statistics
- References:
- Class Size Creation Statistics
- From: Eric Grange
- Class Size Creation Statistics
- Prev by Date: Re: FastcodeCompareStr B&V 2.1
- Next by Date: Re: FastcodeCompareStr B&V 2.1
- Previous by thread: Re: Class Size Creation Statistics
- Next by thread: Re: Class Size Creation Statistics
- Index(es):