Commit graph

11 commits

Author SHA1 Message Date
Dimitry Ivanov
d9d6a84c01 Unify names for pages allocated for small objects
Bug: http://b/26776399
Change-Id: Id5b6f143a526cecca56de18ddad8857dfa1dd165
2016-01-26 17:54:13 -08:00
Dimitry Ivanov
3edc5c41bb linker: align allocated blocks to 16 bytes
C/C++ requires the result of malloc/new to be
aligned for any primitive type.

Change-Id: I715b7679e738f34b3b409993fb3ef242e1321b7f
2016-01-21 14:28:33 -08:00
Dmitriy Ivanov
19656ce537 General purpose memory allocator for linker.
Add basic general purpose memory allocator to
 linker in order to enable usage of other libraries
 like libziparchive.

Change-Id: I4a680ebb36ed5ba67c61249f81dba9f567808434
2015-03-16 11:19:53 -07:00
Dmitriy Ivanov
c9ce70d783 Refactoring: rename linker_allocator files
Change-Id: Ifc08e64b3a85205f072b7abab1149c7ab71e2f75
2015-03-10 15:30:26 -07:00
Elliott Hughes
05fc1d7050 Add missing includes.
Change-Id: Ibf549266a19a67eb9158d341a69dddfb654be669
2015-01-28 19:23:11 -08:00
Dmitriy Ivanov
51a22a12ab Label pages mapped by linker_allocator
Change-Id: I7e0bf29bc1a480e9be0d1ae573ca1063d90d82ff
2014-08-11 09:22:48 -07:00
Dmitriy Ivanov
4151ea73b7 Fix global variable initialization for linker
Linker now calls init functions for itself.

Change-Id: Ibd099812493041ac70f591e3f379ee742b4683b8
2014-07-24 15:33:25 -07:00
Dmitriy Ivanov
d59e50063a Improve detection of already loaded libraries
Linker is now able to resolve symlinked libraries correctly.

soinfo is extended to save the graph of dependencies during
load/unload. Dependencies are used only in CallConstructor.

Bug: 9741592
Change-Id: Id9c48a74c46aa89bcdf3d54ec2f8ba3d398130b1
2014-05-14 15:16:35 -07:00
Dmitriy Ivanov
1079406cab Fix for linker allocator
Change-Id: I18a3f1a8515657f0deb69266184fb516a27f90e8
2014-05-14 12:52:57 -07:00
Dmitriy Ivanov
bc23e530c4 Remove page level mprotects
Freeing block mprotects on the page which it turn
may lead to application crash if linker subsequently
tries to modify another block on the page.

Bug: 14895266
Change-Id: I8ff7f5df467d7be184242de652032b3c84e24b76
2014-05-13 18:34:48 -07:00
Dmitriy Ivanov
d597d263bc Refactor linker allocator
Makes it reusable for different fixed sized and not very
big structures (<PAGE_SIZE).

Change-Id: Id5ec13fc6541b1935ef7fe3671c22b98685abbae
2014-05-12 21:40:09 -07:00