Bug 113145 - HandleSet should use HeapBlocks for storing handles
Summary: HandleSet should use HeapBlocks for storing handles
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
Depends on:
Reported: 2013-03-23 20:16 PDT by Mark Hahnenberg
Modified: 2013-03-24 15:48 PDT (History)
2 users (show)

See Also:

Patch (25.60 KB, patch)
2013-03-23 20:32 PDT, Mark Hahnenberg
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>