[Webkit-unassigned] [Bug 80615] CopiedSpace::tryAllocateOversize assumes system page size

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 12 17:37:19 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=80615





--- Comment #8 from Filip Pizlo <fpizlo at apple.com>  2012-03-12 17:37:19 PST ---
(In reply to comment #7)
> (From update of attachment 131466 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=131466&action=review
> 
> > Source/JavaScriptCore/heap/CopiedSpaceInlineMethods.h:174
> > +    return reinterpret_cast<CopiedBlock*>(reinterpret_cast<size_t>(ptr) & WTF::pageMask());
> 
> This function is hot, so I'd prefer not to turn a constant into two out-of-line function calls.
> 
> I'd suggest making WTF::pageSize() and WTF::pageMask() inline function calls that read globals inside WTF. You can initialize these globals inside WTF::initializeThreading().
> 

This is yucky since pageSize() is not known at compile-time.

I think we should be using our own fake notion of page size (64KB?) whenever possible and just asserting at run-time that it is both larger than pageSize() and is a (power-of-two) multiple of it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list