Lines Matching refs:address
5 #include "src/base/virtual-address-space.h"
88 void VirtualAddressSpace::FreePages(Address address, size_t size) {
89 DCHECK(IsAligned(address, allocation_granularity()));
92 OS::Free(reinterpret_cast<void*>(address), size);
95 bool VirtualAddressSpace::SetPagePermissions(Address address, size_t size,
97 DCHECK(IsAligned(address, page_size()));
100 return OS::SetPermissions(reinterpret_cast<void*>(address), size,
104 bool VirtualAddressSpace::AllocateGuardRegion(Address address, size_t size) {
105 DCHECK(IsAligned(address, allocation_granularity()));
108 void* hint = reinterpret_cast<void*>(address);
117 void VirtualAddressSpace::FreeGuardRegion(Address address, size_t size) {
118 DCHECK(IsAligned(address, allocation_granularity()));
121 OS::Free(reinterpret_cast<void*>(address), size);
140 void VirtualAddressSpace::FreeSharedPages(Address address, size_t size) {
141 DCHECK(IsAligned(address, allocation_granularity()));
144 OS::FreeShared(reinterpret_cast<void*>(address), size);
164 bool VirtualAddressSpace::DiscardSystemPages(Address address, size_t size) {
165 DCHECK(IsAligned(address, page_size()));
168 return OS::DiscardSystemPages(reinterpret_cast<void*>(address), size);
171 bool VirtualAddressSpace::DecommitPages(Address address, size_t size) {
172 DCHECK(IsAligned(address, page_size()));
175 return OS::DecommitPages(reinterpret_cast<void*>(address), size);
195 // On Windows, the address space reservation needs to be split and merged at
235 Address address = region_allocator_.AllocateRegion(hint, size, alignment);
236 if (address == RegionAllocator::kAllocationFailure) return kNullAddress;
238 if (!reservation_.Allocate(reinterpret_cast<void*>(address), size,
241 CHECK_EQ(size, region_allocator_.FreeRegion(address));
245 return address;
248 void VirtualAddressSubspace::FreePages(Address address, size_t size) {
249 DCHECK(IsAligned(address, allocation_granularity()));
256 CHECK(reservation_.Free(reinterpret_cast<void*>(address), size));
257 CHECK_EQ(size, region_allocator_.FreeRegion(address));
260 bool VirtualAddressSubspace::SetPagePermissions(Address address, size_t size,
262 DCHECK(IsAligned(address, page_size()));
267 reinterpret_cast<void*>(address), size,
271 bool VirtualAddressSubspace::AllocateGuardRegion(Address address, size_t size) {
272 DCHECK(IsAligned(address, allocation_granularity()));
277 // It is guaranteed that reserved address space is inaccessible, so we just
279 return region_allocator_.AllocateRegionAt(address, size);
282 void VirtualAddressSubspace::FreeGuardRegion(Address address, size_t size) {
283 DCHECK(IsAligned(address, allocation_granularity()));
287 CHECK_EQ(size, region_allocator_.FreeRegion(address));
299 Address address =
301 if (address == RegionAllocator::kAllocationFailure) return kNullAddress;
304 reinterpret_cast<void*>(address), size,
306 CHECK_EQ(size, region_allocator_.FreeRegion(address));
310 return address;
313 void VirtualAddressSubspace::FreeSharedPages(Address address, size_t size) {
314 DCHECK(IsAligned(address, allocation_granularity()));
321 CHECK(reservation_.FreeShared(reinterpret_cast<void*>(address), size));
322 CHECK_EQ(size, region_allocator_.FreeRegion(address));
336 Address address = region_allocator_.AllocateRegion(hint, size, alignment);
337 if (address == RegionAllocator::kAllocationFailure) {
343 reinterpret_cast<void*>(address), size,
346 CHECK_EQ(size, region_allocator_.FreeRegion(address));
353 bool VirtualAddressSubspace::DiscardSystemPages(Address address, size_t size) {
354 DCHECK(IsAligned(address, page_size()));
357 return reservation_.DiscardSystemPages(reinterpret_cast<void*>(address),
361 bool VirtualAddressSubspace::DecommitPages(Address address, size_t size) {
362 DCHECK(IsAligned(address, page_size()));
365 return reservation_.DecommitPages(reinterpret_cast<void*>(address), size);