Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

gm_page_alloc.c File Reference

#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)

Detailed Description

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.


Function Documentation

GM_ENTRY_POINT void* gm_page_alloc void   
 

gm_page_alloc() returns a ptr to a newly allocated page-aligned buffer of length GM_PAGE_LEN.

Return values:
ptr  Page-aligned buffer of length GM_PAGE_LEN.
See also:
gm_page_free
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_page_free void *    ptr
 

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.

Parameters:
ptr  (IN) Address of the memory page to be freed.
See also:
gm_page_alloc
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)


Generated on Mon Nov 3 15:39:26 2003 for GM by doxygen1.2.15