diff options
author | Simon Hausmann <[email protected]> | 2013-04-12 12:58:29 +0200 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2013-04-12 17:30:06 +0200 |
commit | fd09b7d9b54ccb4d737747ee7fba26f15f4901cd (patch) | |
tree | cb8b68211b0eff5c2b4927182c93749b053edb71 /src/3rdparty/masm/wtf/PageAllocationAligned.cpp | |
parent | 89be8e111c34bf6e96710e574c251587dd59f42b (diff) |
WTF/JSC update to r148273
This brings in various bug fixes in the ARM and MIPS assemblers as well as
a Yarr crash fix and performance fix.
This change doesn't compile as-is, but the next change will
apply the modifications necessary to compile. That'll make future updates
easier as it allows for cherry-picking because the modifications are usually
always the same.
Change-Id: Iac32f62c71e8ff908deb41f28f12fbc98c0823e1
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/3rdparty/masm/wtf/PageAllocationAligned.cpp')
-rw-r--r-- | src/3rdparty/masm/wtf/PageAllocationAligned.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/3rdparty/masm/wtf/PageAllocationAligned.cpp b/src/3rdparty/masm/wtf/PageAllocationAligned.cpp index 6f54710d0b..bdb976b1b7 100644 --- a/src/3rdparty/masm/wtf/PageAllocationAligned.cpp +++ b/src/3rdparty/masm/wtf/PageAllocationAligned.cpp @@ -28,7 +28,7 @@ namespace WTF { -PageAllocationAligned PageAllocationAligned::allocate(size_t size, size_t alignment, OSAllocator::Usage usage, bool writable, bool executable) +PageAllocationAligned PageAllocationAligned::allocate(size_t size, size_t alignment, OSAllocator::Usage usage, bool writable) { ASSERT(isPageAligned(size)); ASSERT(isPageAligned(alignment)); @@ -43,24 +43,22 @@ PageAllocationAligned PageAllocationAligned::allocate(size_t size, size_t alignm int protection = PROT_READ; if (writable) protection |= PROT_WRITE; - if (executable) - protection |= PROT_EXEC; vm_address_t address = 0; - vm_map(current_task(), &address, size, alignmentMask, flags, MEMORY_OBJECT_NULL, 0, FALSE, protection, PROT_READ | PROT_WRITE | PROT_EXEC, VM_INHERIT_DEFAULT); + vm_map(current_task(), &address, size, alignmentMask, flags, MEMORY_OBJECT_NULL, 0, FALSE, protection, PROT_READ | PROT_WRITE, VM_INHERIT_DEFAULT); return PageAllocationAligned(reinterpret_cast<void*>(address), size); #else size_t alignmentDelta = alignment - pageSize(); // Resererve with suffcient additional VM to correctly align. size_t reservationSize = size + alignmentDelta; - void* reservationBase = OSAllocator::reserveUncommitted(reservationSize, usage, writable, executable); + void* reservationBase = OSAllocator::reserveUncommitted(reservationSize, usage, writable, false); // Select an aligned region within the reservation and commit. void* alignedBase = reinterpret_cast<uintptr_t>(reservationBase) & alignmentMask ? reinterpret_cast<void*>((reinterpret_cast<uintptr_t>(reservationBase) & ~alignmentMask) + alignment) : reservationBase; - OSAllocator::commit(alignedBase, size, writable, executable); + OSAllocator::commit(alignedBase, size, writable, false); return PageAllocationAligned(alignedBase, size, reservationBase, reservationSize); #endif |