Refactor storage of global handles.
authorvitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 6 Jun 2011 15:23:04 +0000 (15:23 +0000)
committervitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 6 Jun 2011 15:23:04 +0000 (15:23 +0000)
commit5872e8ee2fb08b739d2087b170fa6be9cbe31ad3
tree58bd51f2c7055c88b28e1f58e5c71e611e124d36
parent7c9cf0b3a117c6670372a40f623e037ace23537d
Refactor storage of global handles.

We used to have a linked list of nodes that were internally
block-allocated.

I kept the node blocks and put them on two lists: 1) the list of all
allocated blocks, 2) the list of blocks with used nodes. (1) is used
to reclaim blocks and (2) is used for traversal during GC. To make
traversal on scavenges faster the nodes holding new space objects are
grouped in an auxiliary array.

This changes the minimal memory usage from 5 words per global handle
to 4. Additional word is used for new space handles.

Review URL: http://codereview.chromium.org/7054072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/api.cc
src/global-handles.cc
src/global-handles.h
src/heap.cc
src/heap.h