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

Issue 566053002: Save more memory by compacting LocalVarDescriptors (Closed)

Created:
6 years, 3 months ago by hausner
Modified:
6 years, 3 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Save more memory by compacting LocalVarDescriptors Instead of allocating an array for the names of local variables, store the names in the LocalVarDescriptors structure directly. Using dart2js to compile a small dart program results in about 7200 LVDs on the heap. Retained memory before: 568KB Retained memory after: 432KB (75%) R=asiva@google.com Committed: https://code.google.com/p/dart/source/detail?r=40228

Patch Set 1 #

Total comments: 8

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -35 lines) Patch
M runtime/vm/object.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/object.cc View 1 4 chunks +13 lines, -23 lines 0 comments Download
M runtime/vm/raw_object.h View 1 1 chunk +20 lines, -4 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 2 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
hausner
6 years, 3 months ago (2014-09-12 20:28:22 UTC) #2
siva
LGTM with one suggestion. https://codereview.chromium.org/566053002/diff/1/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/566053002/diff/1/runtime/vm/object.cc#newcode10801 runtime/vm/object.cc:10801: return raw_ptr()->names()[var_index]; return raw_ptr()->nameAt(var_index); (see ...
6 years, 3 months ago (2014-09-12 22:08:39 UTC) #3
hausner
PTAL Added the assertion you suggested offline, and cleaned up usage of raw() and raw_ptr(). ...
6 years, 3 months ago (2014-09-12 23:48:04 UTC) #4
siva
lgtm
6 years, 3 months ago (2014-09-12 23:50:48 UTC) #5
hausner
6 years, 3 months ago (2014-09-12 23:53:10 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as r40228 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698