Skip to content

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)
            return false;
        }
        PageEntry *new_table = (PageEntry *)page_map(new_rounded);
        if (!new_table) {
            return false;
        }
        if (page->entries) {
            MemCopy(new_table, page->entries, (size)page->len * sizeof(PageEntry));
            page_unmap(page->entries, page->entries_bytes);
        }
        page->entries       = new_table;
        page->entries_bytes = new_rounded;
        page->cap           = (u32)(new_rounded / sizeof(PageEntry));
        return true;
    }
            void *ptr;
            size  bytes;
        } PageEntry;
    
        ///
            Allocator  base;
            size       cached_page_size;
            PageEntry *entries;
            u32        len;
            u32        cap;
Last updated on