Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Florian Klämpfl
Am 17.06.2018 um 20:12 schrieb Terry Mead: It is not a problem it just makes it a bit tricky tracking memory usage because of the delay between releasing the memory and it the reported heap usage decreasing. Just install your own heap manager which is a wrapper around the current one and trac

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Terry Mead
It is not a problem it just makes it a bit tricky tracking memory usage because of the delay between releasing the memory and it the reported heap usage decreasing.  I haven't had a good look at the source but maybe there is some way to take these pending releases into account. Thanks for your

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Florian Klämpfl
Am 17.06.2018 um 16:40 schrieb Fabio Luis Girardi: Em Dom, 17 de jun de 2018 05:48, Florian Klämpfl mailto:flor...@freepascal.org>> escreveu: No. It is added to the "wait for free" queue of the thread which initially allocated it. So, excluding the performance penalty, this is not a

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Fabio Luis Girardi
Em Dom, 17 de jun de 2018 05:48, Florian Klämpfl escreveu: > > > No. It is added to the "wait for free" queue of the thread which initially > allocated it. > So, excluding the performance penalty, this is not a problem? > ___ fpc-pascal maillist -

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Sven Barth via fpc-pascal
Florian Klämpfl schrieb am So., 17. Juni 2018, 10:47: > Am 17.06.2018 um 09:44 schrieb Sven Barth via fpc-pascal: > > Terry Mead mailto:t...@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

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Florian Klämpfl
Am 17.06.2018 um 09:44 schrieb Sven Barth via fpc-pascal: Terry Mead mailto:t...@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

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Florian Klämpfl
Am 17.06.2018 um 07:23 schrieb Terry Mead: If the default memory manager for FP creates a heap for each thread, Define "a heap for each thread". what happens if an object is created in one thread and freed by another ? It causes a slight performance penalty and memory usage increased as the

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Sven Barth via fpc-pascal
Terry Mead 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. (

[fpc-pascal] Multiple thread heaps

2018-06-16 Thread Terry Mead
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 ? Also, do calls to New () allocate space on the thread heap or just allocated by the OS ? --- This email has been checked for viruses by Avast antiviru