Loading libs/binder/MemoryDealer.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -180,7 +180,6 @@ Allocation::~Allocation() /* NOTE: it's VERY important to not free allocations of size 0 because /* NOTE: it's VERY important to not free allocations of size 0 because * they're special as they don't have any record in the allocator * they're special as they don't have any record in the allocator * and could alias some real allocation (their offset is zero). */ * and could alias some real allocation (their offset is zero). */ mDealer->deallocate(freedOffset); // keep the size to unmap in excess // keep the size to unmap in excess size_t pagesize = getpagesize(); size_t pagesize = getpagesize(); Loading Loading @@ -216,6 +215,11 @@ Allocation::~Allocation() } } #endif #endif } } // This should be done after madvise(MADV_REMOVE), otherwise madvise() // might kick out the memory region that's allocated and/or written // right after the deallocation. mDealer->deallocate(freedOffset); } } } } Loading Loading
libs/binder/MemoryDealer.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -180,7 +180,6 @@ Allocation::~Allocation() /* NOTE: it's VERY important to not free allocations of size 0 because /* NOTE: it's VERY important to not free allocations of size 0 because * they're special as they don't have any record in the allocator * they're special as they don't have any record in the allocator * and could alias some real allocation (their offset is zero). */ * and could alias some real allocation (their offset is zero). */ mDealer->deallocate(freedOffset); // keep the size to unmap in excess // keep the size to unmap in excess size_t pagesize = getpagesize(); size_t pagesize = getpagesize(); Loading Loading @@ -216,6 +215,11 @@ Allocation::~Allocation() } } #endif #endif } } // This should be done after madvise(MADV_REMOVE), otherwise madvise() // might kick out the memory region that's allocated and/or written // right after the deallocation. mDealer->deallocate(freedOffset); } } } } Loading