diff options
| author | Vic Yang <victoryang@google.com> | 2019-08-26 14:17:09 -0700 |
|---|---|---|
| committer | Vic Yang <victoryang@google.com> | 2019-08-26 20:35:00 -0700 |
| commit | f1fde773e1681b8d95f3d57a5909ade8f98805f8 (patch) | |
| tree | 7a2d73bf810258f6e43263d5ecd53ba86f43cf8c /libc/stdio/stdio_ext.cpp | |
| parent | 8bccbb01e7f6267e1351fed290c625d292d6212b (diff) | |
Move __dso_handle to RELRO
Most DSOs have a RELRO segment, but some of them have nothing except
__dso_handle in their .data section. This means __dso_handle is taking
up a page as well as a vm_area_struct in kernel slabs for those DSOs.
Let's move it to the RELRO segment to save memory.
On a 32-bit device I tested on, I saw ~400 KB less slab usage on
vm_area_struct. To control for difference in number of cached
processes, I also measured with Android stopped, and I saw ~100 KB less
slab usage. Summing up all dirty pages attributed to shared libraries,
I saw 5.6 MB less dirty pages.
Test: Build and boot.
Change-Id: Ib88e49f1c72352e610affc19623895d954110d4e
Diffstat (limited to 'libc/stdio/stdio_ext.cpp')
0 files changed, 0 insertions, 0 deletions
