Submit #2832
closed
Fix realloc issue causing large amount of munmap and mmap-ing
Added by vadaszi over 9 years ago.
Updated over 9 years ago.
Description
Realloc behaviour was broken by 8120f5e2a46e669c06a7afdd7de60fa6d6996f9d.
This issue makes gdb unusable on large core files as generated when chromium crashes.
Files
- Status changed from New to Resolved
I will commit a slightly modified version of this fix that is even more permissive. It will shortcut size + 4096 == bigbytes unconditionally, and also shortcut size >= bigbytes - (size >> 2) which should reduce geometrically inefficient reallocations as the size gets bigger and bigger.
I will also increase the _slaballoc size for reallocations > 64KB geoemetrically with 'size += size >> 3' (effectively). Not perfect, but it will greatly reduce the overhead for programs that do incremental reallocations.
-Matt
Also available in: Atom
PDF