Changeset 199950 in webkit


Ignore:
Timestamp:
Apr 23, 2016 10:05:54 AM (8 years ago)
Author:
barraclough@apple.com
Message:

bmalloc: vm allocations should plant guard pages
https://bugs.webkit.org/show_bug.cgi?id=156937

Rolling out - looks like this is memory regression.

  • bmalloc/Object.h:

(bmalloc::Object::operator+):
(bmalloc::Object::operator<=):
(bmalloc::Object::operator-): Deleted.

  • bmalloc/VMAllocate.h:

(bmalloc::vmDeallocate):
(bmalloc::vmRevokePermissions): Deleted.

  • bmalloc/VMHeap.cpp:

(bmalloc::VMHeap::allocateSmallChunk):

Location:
trunk/Source/bmalloc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/bmalloc/ChangeLog

    r199936 r199950  
     12016-04-23  Gavin Barraclough  <barraclough@apple.com>
     2
     3        bmalloc: vm allocations should plant guard pages
     4        https://bugs.webkit.org/show_bug.cgi?id=156937
     5
     6        Rolling out - looks like this is memory regression.
     7
     8        * bmalloc/Object.h:
     9        (bmalloc::Object::operator+):
     10        (bmalloc::Object::operator<=):
     11        (bmalloc::Object::operator-): Deleted.
     12        * bmalloc/VMAllocate.h:
     13        (bmalloc::vmDeallocate):
     14        (bmalloc::vmRevokePermissions): Deleted.
     15        * bmalloc/VMHeap.cpp:
     16        (bmalloc::VMHeap::allocateSmallChunk):
     17
    1182016-04-22  Geoffrey Garen  <ggaren@apple.com>
    219
  • trunk/Source/bmalloc/bmalloc/Object.h

    r199936 r199950  
    5353   
    5454    Object operator+(size_t);
    55     Object operator-(size_t);
    5655    bool operator<=(const Object&);
    5756
     
    6665}
    6766
    68 inline Object Object::operator-(size_t offset)
    69 {
    70     return Object(m_chunk, m_offset - offset);
    71 }
    72 
    7367inline bool Object::operator<=(const Object& other)
    7468{
  • trunk/Source/bmalloc/bmalloc/VMAllocate.h

    r199936 r199950  
    138138}
    139139
    140 inline void vmRevokePermissions(void* p, size_t vmSize)
    141 {
    142     vmValidate(p, vmSize);
    143     mprotect(p, vmSize, PROT_NONE);
    144 }
    145 
    146140// Allocates vmSize bytes at a specified power-of-two alignment.
    147141// Use this function to create maskable memory regions.
  • trunk/Source/bmalloc/bmalloc/VMHeap.cpp

    r199936 r199950  
    7676    Object end(chunk, chunkSize);
    7777
    78     vmRevokePermissions(begin.begin(), pageSize);
    79     vmRevokePermissions(end.begin() - pageSize, pageSize);
    80 
    81     begin = begin + pageSize;
    82     end = end - pageSize;
    83 
    8478    for (Object it = begin; it + pageSize <= end; it = it + pageSize) {
    8579        SmallPage* page = it.page();
Note: See TracChangeset for help on using the changeset viewer.