Bug 113145

Summary: HandleSet should use HeapBlocks for storing handles
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Severity: Normal CC: fpizlo, ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch ggaren: review+

Description Mark Hahnenberg 2013-03-23 20:16:35 PDT
Currently it uses WTF::BlockStack, which is malloc-ed memory. Let's use the BlockAllocator. By doing this we can also get rid of the pointer to the HandleSet from each Handle, making them 24 bytes rather than 32 bytes. This change will also enable us to return HandleBlocks back to the OS and reduce the fragmentation of Handles in a future patch.
Comment 1 Mark Hahnenberg 2013-03-23 20:32:01 PDT
Created attachment 194731 [details]
Comment 2 Geoffrey Garen 2013-03-24 15:29:34 PDT
Comment on attachment 194731 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=194731&action=review


> Source/JavaScriptCore/heap/HandleBlockInlines.h:53
> +    return reinterpret_cast<char*>(this) + ((sizeof(HandleBlock) + 7) & ~7);

Let's use roundUpToMultipleOf<sizeof(double)>() here, to make it a little less mysterious.
Comment 3 Mark Hahnenberg 2013-03-24 15:48:07 PDT
Committed r146734: <http://trac.webkit.org/changeset/146734>