Commit graph

2 commits

Author SHA1 Message Date
Ryan Prichard
321f34979c __cxa_atexit_test: declare __cxa_atexit and __cxa_finalize
After updating libc++, they're no longer declared in cxxabi.h, so the
test must declare them locally.

8bd0dc5bfe

Temporarily use a return type of "int" to avoid a Clang error about
conflicting return types.

Bug: http://b/175635923
Test: treehugger
Change-Id: I16ba3dc8cc84cc18ee7fbfe9d2e3fa0cd4eefeae
2022-12-08 17:43:29 -08:00
Ryan Prichard
afa983c8d4 Rewrite __cxa_atexit / __cxa_finalize
Simplify:
 - Use a single memory-mapped region to hold the table of destructors.
   Double its capacity each time it is expanded.
 - Add a recompaction pass at the end of __cxa_finalize that shifts
   entries forward and uses madvise to clean pages.

Bug: http://b/148055738
Test: bionic-unit-tests
Change-Id: Ieb9da2b88640a8a5277d217b43826b5b7e246781
2020-03-06 21:04:32 -08:00