summaryrefslogtreecommitdiff
path: root/linker/linker_block_allocator.h
AgeCommit message (Collapse)Author
2019-01-30Purge linker block allocators before leaving linkerVic Yang
This is the second attempt to purge linker block allocators. Unlike the previously reverted change which purge allocators whenever all objects are freed, we only purge right before control leaves the linker. This limits the performance impact to one munmap() call per dlopen(), in most cases. Bug: 112073665 Test: Boot and check memory usage with 'showmap'. Test: Run camear cold start performance test. Change-Id: I02c7c44935f768e065fbe7ff0389a84bd44713f0
2019-01-29Revert "linker: Purge block allocator memory when possible"Vic Yang
This reverts commit fb78a4ac1b93218f59aa44089ae5f4dbfababf0d. Reason for revert: Performance regression. Change-Id: Ib12335fc7478dad933da00b8bc525366c9330a17
2019-01-25Move the linker allocator into libcRyan Prichard
Rename LinkerMemoryAllocator -> BionicAllocator Rename LinkerSmallObjectAllocator -> BionicSmallObjectAllocator libc and the linker need to share an instance of the allocator for allocating and freeing dynamic ELF TLS memory (DTVs and segments). The linker also continues to use this allocator. Bug: http://b/78026329 Test: /data/nativetest/bionic-unit-tests-static Test: /data/nativetest64/bionic-unit-tests-static Test: /data/nativetest/linker-unit-tests/linker-unit-tests32 Test: /data/nativetest64/linker-unit-tests/linker-unit-tests64 Change-Id: I2da037006ddf8041a75f3eba2071a8fcdcc223ce
2019-01-23linker: Purge block allocator memory when possibleVic Yang
If all allocated memory from a block allocator is freed, it is a good opportunity to purge all the pages allocated to reduce lingering dirty pages. Memory saving varies with the platform and what processes are running. Measuring right after boot, this saves ~1.8MB on cuttelfish and ~1.3MB on a 32-bit ARM device. Bug: 112073665 Test: Boot and check memory usage with 'showmap'. Change-Id: I53769e0ec9699f0b3645cdf281a2c0bbffb98676
2018-10-25Clean up bionic_macros.h a bit.Elliott Hughes
Use <android-base/macros.h> instead where possible, and move the bionic macros out of the way of the libbase ones. Yes, there are folks who manage to end up with both included at once (thanks OpenGL!), and cleaning that up doesn't seem nearly as practical as just making this change. Bug: N/A Test: builds Change-Id: I23fc544f39d5addf81dc61471771a5438778895b
2018-02-13Switch the rest of our internal headers to #pragma once.Elliott Hughes
We've been using #pragma once for new internal files, but let's be more bold. Bug: N/A Test: builds Change-Id: I7e2ee2730043bd884f9571cdbd8b524043030c07
2017-02-15Unify linker files under one license (BSD)Dimitry Ivanov
Historically we had part of the linker licensed under BSD and another part under Apache 2 license. This commit makes all the linker code licensed under BSD license. Test: m Change-Id: I11b8163ae75966b5768d3fe992679de376106515
2015-03-16General purpose memory allocator for linker.Dmitriy Ivanov
Add basic general purpose memory allocator to linker in order to enable usage of other libraries like libziparchive. Change-Id: I4a680ebb36ed5ba67c61249f81dba9f567808434
2015-03-10Rename LinkerAllocator and LinkerAllocatorPageDmitriy Ivanov
Change-Id: I87d80fbcd4ec26c0ee4f601b9c4c64f600418dd9
2015-03-10Refactoring: rename linker_allocator filesDmitriy Ivanov
Change-Id: Ifc08e64b3a85205f072b7abab1149c7ab71e2f75