[fpc-devel] RTL: high CPU load in heap manager
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Nov 11 10:35:15 CET 2014
On 11/11/14 10:28, Adriaan van Os wrote:
> Jonas Maebe wrote:
>> On 10/11/14 18:47, Karoly Balogh (Charlie/SGR) wrote:
>>> It's remove_freed_fixed_chunks(). Can someone explain to me under what
>>> condition this code is triggered very often and/or could take long to
>>> execute (there's a loop in there)?
>>
>> This was reported earlier too, but I couldn't reproduce it:
>> http://bugs.freepascal.org/view.php?id=18079 (especially comment 47405
>> by Sergei).
>
> I suggest to use cmem and compare the results.
>
> I will also note that malloc uses mremap
None of that would explain the differences experienced in the referred
bug report, because we don't use mremap-like functionality on any
platform at this time. The issue there appears to be a corner case that
makes the heap manager reformat/free/reallocate its internal heap blocks
all the time on some systems, while on other systems it won't do that
even though it's presented with exactly the same memory
allocation/reallocation pattern.
Jonas
More information about the fpc-devel
mailing list