Ignore:
Timestamp:
Dec 21, 2010, 3:53:25 PM (14 years ago)
Author:
[email protected]
Message:

JavaScriptCore: Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
https://bugs.webkit.org/show_bug.cgi?id=51359

Patch by Geoffrey Garen <[email protected]> on 2010-12-21
Reviewed by Gavin Barraclough & Oliver Hunt.

I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
Heap::allocateBlock (1902752929), and some other leaks and crashes as well.

  • runtime/AlignedMemoryAllocator.h: Removed. Supplanted by

PageAllocationAligned.

  • runtime/Collector.cpp:

(JSC::Heap::destroy):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):
(JSC::Heap::addWeakGCHandle):

  • runtime/Collector.h: Switched from AlignedMemoryAllocator to

PageAllocationAligned.

  • runtime/GCHandle.cpp:
  • runtime/GCHandle.h: Ditto.
  • wtf/PageAllocation.h:

(WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
functions. Supplanted by PageAllocationAligned.

  • wtf/PageAllocationAligned.cpp: Added.

(WTF::PageAllocationAligned::allocate):
(WTF::PageAllocationAligned::deallocate):

  • wtf/PageAllocationAligned.h: Added.

(WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
class for doing aligned memory allocation. This class properly matches
allocation and deallocation library calls, fixing a long-standing bug
in PageAllocation.

  • wtf/Platform.h: Removed some defunction VM platform defines.
  • wtf/wtf.pri: Updated build files.

JavaScriptGlue: Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
https://bugs.webkit.org/show_bug.cgi?id=51359

Patch by Geoffrey Garen <[email protected]> on 2010-12-21
Reviewed by Gavin Barraclough & Oliver Hunt.

  • ForwardingHeaders/wtf/PageAllocationAligned.h: Added.

WebCore: Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
https://bugs.webkit.org/show_bug.cgi?id=51359

Patch by Geoffrey Garen <[email protected]> on 2010-12-21
Reviewed by Gavin Barraclough & Oliver Hunt.

  • ForwardingHeaders/wtf/PageAllocationAligned.h: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/MarkStack.h

    r73545 r74431  
    8989
    9090        static void* allocateStack(size_t size) { return OSAllocator::reserveAndCommit(size); }
    91         static void releaseStack(void* addr, size_t size) { OSAllocator::release(addr, size); }
     91        static void releaseStack(void* addr, size_t size) { OSAllocator::decommitAndRelease(addr, size); }
    9292
    9393        static void initializePagesize();
Note: See TracChangeset for help on using the changeset viewer.