How does V8 manage the memory of object instances?
http://code.google.com/apis/v8/design.html The above page explains the optimization technique v8 team uses to enable fast property access. But how about it's object instances? New properties can be added to the object anytime, so it should be allowed to grow in size. Does it simply allocate the memory with a default size and when it hits the size limit creates a new buffer and copy the old instance to the new buffer? Or there's another cool trick? Newly allocated JavaScript object in V8 look like ( -> means "points to"): [ class ] -> ... ; pointer to the hidden class [ properties ] -> [empty