Lines Matching refs:region

10 #include "src/base/address-region.h"
18 // region. Minimum allocation unit is |page_size|. Requested allocation size
20 // The region allocation algorithm implements best-fit with coalescing strategy:
21 // it tries to find a smallest suitable free region upon allocation and tries
22 // to merge region with its neighbors upon freeing.
24 // This class does not perform any actual region reservation.
35 // The region can be allocated from.
37 // The region has been carved out of the wider area and is not allocatable.
39 // The region has been allocated and is managed by a RegionAllocator.
52 // regions, a region must be split into sub-regions (using
56 // into a larger, free region again.
58 // The on_split callback is called to signal that an existing region is split
59 // so that [start, start+size) becomes a new region.
69 // Allocates region of |size| (must be |page_size|-aligned). Returns
70 // the address of the region on success or kAllocationFailure.
72 // Same as above but tries to randomize the region displacement.
75 // Allocates region of |size| at |requested_address| if it's free. Both the
87 // Allocates a region of |size| aligned to |alignment|. The size and alignment
88 // must be a multiple of |page_size|. Returns the address of the region on
92 // Attempts to allocate a region of the given size and alignment at the
93 // specified address but fall back to allocating the region elsewhere if
97 // Frees region at given |address|, returns the size of the region.
98 // There must be a used region starting at given address otherwise nothing
102 // Decreases size of the previously allocated region at |address|, returns
104 // less than or equal to current region's size. Setting new size to zero
105 // frees the region.
108 // If there is a used region starting at given address returns its size
112 // Returns true if there are no pages allocated in given region.
130 // The alignment of the allocated region's addresses and granularity of
131 // the allocated region's sizes.
155 // The whole region.
158 // Number of |page_size_| in the whole region.
168 // Minimum region size. Must be a pow of 2.
193 // Returns region containing given address or nullptr.
196 // Adds given region to the set of free regions.
197 void FreeListAddRegion(Region* region);
199 // Finds best-fit free region for given size.
202 // Removes given region from the set of free regions.
203 void FreeListRemoveRegion(Region* region);
205 // Splits given |region| into two: one of |new_size| size and a new one
206 // having the rest. The new region is returned.
207 Region* Split(Region* region, size_t new_size);