This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizers] Increase allocated chunk limit for LargeMmapAllocator
ClosedPublic

Authored by alekseyshl on Feb 23 2018, 1:24 PM.

Details

Summary

There are applications out there which allocate more than 1 << 18 large chunks
of memory (those handled by LargeMmapAllocator, aka secondary allocator).

For 64 bits, secondary allocator stores allocated chunks in a growing on
demand region of memory, growing in blocks of 128K, up to 1 << 20 chunks total.

Sanitizer internal allocator's secondary uses fixed size array storing up
to 1 << 15 chunks (down to 256K from 2Mb of memory used for that array).

Nothing is changed for 32 bits, chunks are still stored in the fixed size
array (up to 1 << 15 chunks).

Diff Detail

Event Timeline

alekseyshl created this revision.Feb 23 2018, 1:24 PM
Herald added subscribers: Restricted Project, delcypher, kubamracek. · View Herald TranscriptFeb 23 2018, 1:24 PM
eugenis accepted this revision.Feb 23 2018, 2:03 PM
eugenis added inline comments.
lib/sanitizer_common/sanitizer_allocator_secondary.h
106

keep this check?

This revision is now accepted and ready to land.Feb 23 2018, 2:03 PM
  • Add a comment and one CHECK back.
alekseyshl marked an inline comment as done.Feb 23 2018, 4:29 PM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.