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

Issue 545026: Add some interfaces to the GC that allow us to reserve space. This is needed... (Closed)

Created:
10 years, 11 months ago by Erik Corry
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add some interfaces to the GC that allow us to reserve space. This is needed for partial snapshots. After reserving space we can be sure that allocations will happen linearly (no GCs and no free-list allocation). This change also contains the start of the partial snapshot support, which, however is not yet completed or tested. Committed: http://code.google.com/p/v8/source/detail?r=3584

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+299 lines, -27 lines) Patch
M src/arm/fast-codegen-arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/frames.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/heap.h View 3 chunks +10 lines, -6 lines 1 comment Download
M src/mark-compact.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/serialize.h View 4 chunks +14 lines, -7 lines 0 comments Download
M src/serialize.cc View 3 chunks +30 lines, -1 line 0 comments Download
M src/spaces.h View 7 chunks +29 lines, -2 lines 1 comment Download
M src/spaces.cc View 3 chunks +73 lines, -7 lines 2 comments Download
M test/cctest/test-serialize.cc View 2 chunks +137 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Erik Corry
10 years, 11 months ago (2010-01-12 13:57:07 UTC) #1
Mads Ager (chromium)
Does calling ReserveSpace really ensure that you can allocate that many bytes? What about unusable ...
10 years, 11 months ago (2010-01-12 14:17:49 UTC) #2
Erik Corry
The caller is supposed to precompensate for memory that is wasted at the end of ...
10 years, 11 months ago (2010-01-12 14:24:24 UTC) #3
Mads Ager (chromium)
10 years, 11 months ago (2010-01-12 14:34:59 UTC) #4
On 2010/01/12 14:24:24, Erik Corry wrote:
> The caller is supposed to precompensate for memory that is wasted at the end
of
> pages.  This seems onerous, but it's the sort of thing the snapshot code
already
> needs to keep track of so it's not too bad.  I will update the comments
> accordingly.

OK

> As for the large object space that is a little messy.  In practice, a context
> snapshot won't contain many large objects and it may be OK to just fudge it by
> using an AlwaysAllocate scope around large object allocations. At least there
> are no issues with non-contiguous allocation.

As we discussed, the factor of 2 should be enough since the OS granularity is
not part of our accounting.

LGTM

Powered by Google App Engine
This is Rietveld 408576698