[fpc-devel] GetHeapStatus.TotalAllocated
Nikolai Zhubr
n-a-zhubr at yandex.ru
Tue Feb 16 18:45:36 CET 2010
16.02.2010 20:17, Nikolai Zhubr:
> Ok. Would it be sufficient to only hook Getmem and Freemem?
>
> From a brief look it seems other members (such as ReAllocMem) do not
> modify the heap directly, so they need not be hooked I guess.
After some more reading and testing I think generally GetMem, FreeMem,
and FreeMemSize should be enough, however I'm not sure about some corner
cases. (For example, allocating zero bytes is valid, but such allocation
will result in non-zero memory block, so this needs a special check
probably.) So overall, this is not absolutely trivial.
Nikolai
>
> Nikolai
>
>>
>>
>> Jonas
>> _______________________________________________
>> fpc-devel maillist - fpc-devel at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
More information about the fpc-devel
mailing list