[fpc-pascal] Multiple thread heaps

Sven Barth pascaldragon at googlemail.com
Sun Jun 17 13:01:25 CEST 2018


Florian Klämpfl <florian at freepascal.org> schrieb am So., 17. Juni 2018,
10:47:

> 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.
>

Ah! That's how it was! 🤦‍♀️

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180617/2b918131/attachment.html>


More information about the fpc-pascal mailing list