diff options
author | Mathieu Chartier <mathieuc@google.com> | 2013-11-21 11:48:14 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2013-11-22 15:46:13 -0800 |
commit | 50482234bed852766498321f71d2ff5e46e4fec2 (patch) | |
tree | 50f7d54b3696e6d6c1fcafaa0235d64356a74436 /compiler/image_writer.cc | |
parent | b6b4c459ef823ba62696796542519655c79423c2 (diff) | |
download | art-50482234bed852766498321f71d2ff5e46e4fec2.zip art-50482234bed852766498321f71d2ff5e46e4fec2.tar.gz art-50482234bed852766498321f71d2ff5e46e4fec2.tar.bz2 |
Compact zygote.
We now start out using the bump pointer allocator and switch to
the free list collector (ROSAlloc) after the zygote forks.
Before compaction:
Zygote size: 9060352
After compaction
Zygote size: 8425864
The main reason the size doesn't reduce more is that most of the
zygote space is non-movable objects allocated by
VMRuntime.newNonMovableObject. The objects which are non-movable
but could be movable include around 10000 classes and some number
of fields and methods.
Bug: 8981901
Change-Id: Iea21b70fb7af27cb7e92d72070d278a5cd4026ac
Diffstat (limited to 'compiler/image_writer.cc')
-rw-r--r-- | compiler/image_writer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index 740babd..90e2c65 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -525,7 +525,7 @@ void ImageWriter::CalculateNewObjectOffsets(size_t oat_loaded_size, size_t oat_d // Return to write header at start of image with future location of image_roots. At this point, // image_end_ is the size of the image (excluding bitmaps). - const size_t heap_bytes_per_bitmap_byte = 8 * gc::accounting::SpaceBitmap::kAlignment; + const size_t heap_bytes_per_bitmap_byte = kBitsPerByte * gc::accounting::SpaceBitmap::kAlignment; const size_t bitmap_bytes = RoundUp(image_end_, heap_bytes_per_bitmap_byte) / heap_bytes_per_bitmap_byte; ImageHeader image_header(reinterpret_cast<uint32_t>(image_begin_), |