Home | History | Annotate | Download | only in libutils

Lines Matching refs:page

34 // The ideal size of a page allocation (these need to be multiples of 8)
38 // The maximum amount of wasted space we can have per page
39 // Allocations exceeding this will have their own dedicated page
86 class LinearAllocator::Page {
88 Page* next() { return mNextPage; }
89 void setNext(Page* next) { mNextPage = next; }
91 Page()
98 return (void*) (((size_t)this) + sizeof(Page));
106 Page(const Page& /*other*/) {}
107 Page* mNextPage;
122 Page* p = mPages;
124 Page* next = p->next();
125 p->~Page();
132 void* LinearAllocator::start(Page* p) {
133 return ALIGN_PTR(((size_t*)p) + sizeof(Page));
136 void* LinearAllocator::end(Page* p) {
152 Page* p = newPage(mPageSize);
167 // Allocation is too large, create a dedicated page for the allocation
168 Page* page = newPage(size);
170 page->setNext(mPages);
171 mPages = page;
174 return start(page);
194 LinearAllocator::Page* LinearAllocator::newPage(size_t pageSize) {
195 pageSize = ALIGN(pageSize + sizeof(LinearAllocator::Page));
200 return new (buf) Page();