Re: [fpc-pascal] question about FPC heap and threading

2010-08-12 Thread Mark Morgan Lloyd

Seth Grover wrote:

These are very simple questions, but I just want to make sure a few of
my assumptions are correct:

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.


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

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] question about FPC heap and threading

2010-08-12 Thread Michael Van Canneyt



On Thu, 12 Aug 2010, Mark Morgan Lloyd wrote:


Seth Grover wrote:

These are very simple questions, but I just want to make sure a few of
my assumptions are correct:

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.


Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal