[fpc-devel] GetHeapStatus.TotalAllocated
    Jonas Maebe 
    jonas.maebe at elis.ugent.be
       
    Tue Feb 16 16:59:14 CET 2010
    
    
  
On 16 Feb 2010, at 16:49, Nikolai Zhubr wrote:
> 16.02.2010 14:39, Michael Schnell:
>> On 02/13/2010 09:38 PM, Jonas Maebe wrote:
>>> It would make the memory manager slower, and I don't think that  
>>> aggregating few statistics is a good reason to do so
>>>
>> Yep. But it should be possible to implement a function that on  
>> request
>> (slowly) collects the list of (or at last sum of) the state of all
>> existing threads.
That would require separately maintaining a list of the memory  
managers of all threads, which afaik does not exist currently.
> Exactly! That's what I'd be happy with. I'll call it once per second  
> so a bit of slowdown wouldn't matter much. I think creating a custom  
> "wrapper" heap manager just to be able to get total mem usage is a  
> bit overkill, though maybe I'll try that method too.
I think it is the only proper way.
Jonas
    
    
More information about the fpc-devel
mailing list