PageEntry
Description
Per-live-allocation descriptor. The byte count is the rounded mmap length (a multiple of the OS page size), which is what munmap / VirtualFree need. The user pointer is the mmap’d base address.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Page.c:171:
return false;
}
PageEntry *new_table = (PageEntry *)page_map(new_rounded);
if (!new_table) {
return false;- In
Page.c:176:
}
if (page->entries) {
MemCopy(new_table, page->entries, (size)page->len * sizeof(PageEntry));
page_unmap(page->entries, page->entries_bytes);
}- In
Page.c:181:
page->entries = new_table;
page->entries_bytes = new_rounded;
page->cap = (u32)(new_rounded / sizeof(PageEntry));
return true;
}- In
Page.h:40:
void *ptr;
size bytes;
} PageEntry;
///
- In
Page.h:62:
Allocator base;
size cached_page_size;
PageEntry *entries;
u32 len;
u32 cap;
Last updated on