Index: src/snapshot-common.cc |
diff --git a/src/snapshot-common.cc b/src/snapshot-common.cc |
index 6bcabffb8111121b2360fd388c377034acab5099..a3e80185702622a48dabb1b8a2ef9130757bf2c5 100644 |
--- a/src/snapshot-common.cc |
+++ b/src/snapshot-common.cc |
@@ -135,6 +135,8 @@ void CalculateFirstPageSizes(bool is_default_snapshot, |
required = (startup_reservations[startup_index].chunk_size() + |
2 * context_reservations[context_index].chunk_size()) + |
Page::kObjectStartOffset; |
+ // Add a small allowance to the code space for small scripts. |
+ if (space == CODE_SPACE) required += 32 * KB; |
} else { |
// We expect the vanilla snapshot to only require on page per space. |
DCHECK(!is_default_snapshot); |