[fpc-pascal] question about FPC heap and threading

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Fri Aug 13 11:13:49 CEST 2010


Michael Van Canneyt wrote:
> On Thu, 12 Aug 2010, Mark Morgan Lloyd wrote:
> 
>> Seth Grover wrote:

>>> 1. The default FPC heap manager uses one heap per thread, right? I am
>>> basing this assumption off of things I have read in various threads on
>>> this and other mailing lists since around 2.2.x-ish. Looking at
>>> heap.inc I see that the "freelists" variable is a threadvar, which
>>> indicates to me that each thread has its own heap.
>>
>> If that's the case and also applies to Lazarus it's going to save me a 
>> lot of effort, so I'd be interested to see this confirmed as well.
> 
> FPC uses one heap per thread. If lazarus doesn't install it's own heap 
> manager, it is true for Lazarus as well.

Thanks Michael, I think that's going to be useful.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list