Date: Thu, 12 Apr 2018 09:40:23 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com Subject: Re: [RFC PATCH] reduce severity of ldso reclaim_gaps hack On Thu, 12 Apr 2018, Rich Felker wrote: > > > This does not seem necessary. Free chunks in the last bin can be > > > larger than MMAP_THRESHOLD; they're just broken up to satisfy > > > allocations. Of course it's unlikely to happen anyway. > > > > Do such oversized chunks appear in normal operation? This seems non-obvious, > > so a comment pointing that out would probably be helpful. > > The only way I could see it happening is on an arch ABI that allows > very large pages (and has the ELF load segments aligned accordingly, > as x86_64 does). In this case if the kernel/hardware only supported > large (e.g. 2MB) pages, you'd pretty much always end up with >1.5MB of > reclaimed space per DSO. IMO this is an awful kernel/hardware > constraint to have, very wasteful, but it's exactly the situation > where you'd most care about the gaps getting reclaimed for something > useful. What I meant to ask is: apart from chunks created via reclaim_gaps, can such oversized chunks appear as a result of malloc-family calls invoked by the program? Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.