Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: src/snapshot/serializer.h

Issue 2229583003: [serializer] reserve maps one by one to avoid fragmentation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix build Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/snapshot/deserializer.cc ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serializer.h
diff --git a/src/snapshot/serializer.h b/src/snapshot/serializer.h
index 45f891e190c53cc4c0c95ad34e42943fcc2caf1a..ff2c6a979d183695d47c8cff2277f28dc4ced11b 100644
--- a/src/snapshot/serializer.h
+++ b/src/snapshot/serializer.h
@@ -190,6 +190,7 @@ class Serializer : public SerializerDeserializer {
// This will return the space for an object.
SerializerReference AllocateLargeObject(int size);
+ SerializerReference AllocateMap();
SerializerReference Allocate(AllocationSpace space, int size);
int EncodeExternalReference(Address addr) {
return external_reference_encoder_.Encode(addr);
@@ -245,6 +246,8 @@ class Serializer : public SerializerDeserializer {
uint32_t pending_chunk_[kNumberOfPreallocatedSpaces];
List<uint32_t> completed_chunks_[kNumberOfPreallocatedSpaces];
uint32_t max_chunk_size_[kNumberOfPreallocatedSpaces];
+ // Number of maps that we need to allocate.
+ uint32_t num_maps_;
// We map serialized large objects to indexes for back-referencing.
uint32_t large_objects_total_size_;
« no previous file with comments | « src/snapshot/deserializer.cc ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698