#include "gm_call_trace.h"
#include "gm_debug.h"
#include "gm_internal.h"
#include "gm_malloc_debug.h"
Data Structures | |
struct | gm_free_page |
struct | gm_page_allocation_record |
Functions | |
GM_ENTRY_POINT void * | gm_page_alloc () |
GM_ENTRY_POINT void | gm_page_free (void *ptr) |
This file contains gm_page_alloc() and gm_page_free().
These GM API functions allow pages to be allocated and freed.
These modules implement a platform-independent page allocation interface, with automatic initialization and finalization for use in the kernel.
In some cases, this file uses platform-specific features to implement page allocation efficiently, but by default this module allocates blocks of pages and keeps a page free list to recycle freed pages, but the module never frees the blocks of pages until all pages have been freed.
|
gm_page_alloc() returns a ptr to a newly allocated page-aligned buffer of length GM_PAGE_LEN.
|
|
gm_page_free() frees the page of memory at ptr previously allocated by gm_page_alloc(). If all pages have been freed, free all of the memory allocated for pages.
|