Does v8 preserve locality of objects that were pushed from new space to old space?

11 views
Skip to first unread message

Bogdan

unread,
Aug 20, 2019, 4:46:43 AM8/20/19
to v8-users
Does v8 preserve locality of objects that were pushed from new space to old space? Let's say I've created some objects within a loop so these objects will be stored in memory side by side because v8 uses bump pointer allocation for objects in new space. So far so good. After some time and some amount of new allocations in new space v8 decided that our objects are long-lived and it's going to push these objects from  new space to old space. The questions is - will v8 preserve locality of these contiguous objects therefore they will be allocated in old space also side by side preserving original locality? Or these object will be pushed (allocated) to old space one by one and locality will not be preserved (like in linked list slab allocators) ?

Jakob Kummerow

unread,
Aug 20, 2019, 5:22:37 AM8/20/19
to v8-users
There is no guarantee that locality will be preserved. It depends on where there is available space in old-space. You might get lucky :-)

(This is well known to be one of the drawbacks of generational moving GCs, but as far as I'm aware our experiments indicate that the benefits more than make up for it.)


On Tue, Aug 20, 2019 at 10:46 AM Bogdan <bgn...@gmail.com> wrote:
Does v8 preserve locality of objects that were pushed from new space to old space? Let's say I've created some objects within a loop so these objects will be stored in memory side by side because v8 uses bump pointer allocation for objects in new space. So far so good. After some time and some amount of new allocations in new space v8 decided that our objects are long-lived and it's going to push these objects from  new space to old space. The questions is - will v8 preserve locality of these contiguous objects therefore they will be allocated in old space also side by side preserving original locality? Or these object will be pushed (allocated) to old space one by one and locality will not be preserved (like in linked list slab allocators) ?

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/6267033a-f74e-4320-8026-0843adf3b68b%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages