[fpc-pascal] Multiple thread heaps

Florian Klämpfl florian at freepascal.org
Sun Jun 17 10:47:53 CEST 2018


Am 17.06.2018 um 09:44 schrieb Sven Barth via fpc-pascal:
> Terry Mead <tlm at weighbatch.com <mailto:tlm at weighbatch.com>> schrieb am So., 17. Juni 2018, 07:45:
> 
>     If the default memory manager for FP creates a heap for each thread, what happens if an object is created in one
>     thread and freed by another ?
> 
> 
> If I remember correctly the memory becomes part of the thread's free list that freed the memory. (Though I could be 
> wrong here)

No. It is added to the "wait for free" queue of the thread which initially allocated it.



More information about the fpc-pascal mailing list