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

Issue 4295004: Attempt to collect more garbage before panicking with out of memory. (Closed)

Created:
10 years, 1 month ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Attempt to collect more garbage before panicking with out of memory. Currently weak handles retain an object for another GC round (oftem times, major GC round.) Instrumenting Chromium shows that navigation leaves many global objects which are only collected in next go. Let's attempt to collect more garbage when approacing OOM condition. This is a better version of rolled out r5455: now it's correctly rebuilds object groups between additional GCs. Committed: http://code.google.com/p/v8/source/detail?r=5761

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressing various English usage concerns #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -11 lines) Patch
M src/global-handles.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/global-handles.cc View 3 chunks +5 lines, -1 line 0 comments Download
M src/heap.h View 1 2 chunks +14 lines, -3 lines 0 comments Download
M src/heap.cc View 1 7 chunks +38 lines, -5 lines 0 comments Download
M src/heap-inl.h View 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
antonm
Slava, may you have a look?
10 years, 1 month ago (2010-11-02 17:38:10 UTC) #1
Vyacheslav Egorov (Chromium)
LGTM http://codereview.chromium.org/4295004/diff/1/5 File src/heap.cc (right): http://codereview.chromium.org/4295004/diff/1/5#newcode436 src/heap.cc:436: MarkCompactCollector::SetForceCompaction(true); do we really want to get tons ...
10 years, 1 month ago (2010-11-03 12:06:17 UTC) #2
antonm
10 years, 1 month ago (2010-11-03 12:53:49 UTC) #3
Thank you very much---that was really educating (no kidding) :)

Submitting

http://codereview.chromium.org/4295004/diff/1/5
File src/heap.cc (right):

http://codereview.chromium.org/4295004/diff/1/5#newcode436
src/heap.cc:436: MarkCompactCollector::SetForceCompaction(true);
On 2010/11/03 12:06:17, Vyacheslav Egorov wrote:
> do we really want to get tons of compactions here? 

Discussed offline---as should be an exceptional path, let's do the best we can.

http://codereview.chromium.org/4295004/diff/1/5#newcode469
src/heap.cc:469: bool next_gc_could_collect_more = false;
On 2010/11/03 12:06:17, Vyacheslav Egorov wrote:
> could -> can?

And another 'cannot help':

http://www.merriam-webster.com/dictionary/could
http://oxforddictionaries.com/view/entry/m_en_gb0183790#m_en_gb0183790

but changed to likely.

http://codereview.chromium.org/4295004/diff/1/6
File src/heap.h (right):

http://codereview.chromium.org/4295004/diff/1/6#newcode1258
src/heap.h:1258: // Returns whether there is a chance another major GC could
On 2010/11/03 12:06:17, Vyacheslav Egorov wrote:
> is a change _that_ another ?

Done, but I cannot help quoting the following:

Omission of _that_ (conjunction).

Though this is strictly speaking not an ellipsis, but rather an exercise of the
ancient right to abstain from subordinating a substantival clause[...]

Yay!

http://books.google.com/books?id=Vr7muDFR6j4C&lpg=PA135&ots=F41-3ydPl0&dq=%22...

Powered by Google App Engine
This is Rietveld 408576698