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

gm_alloc_pages.c File Reference

#include "gm_call_trace.h"
#include "gm_debug.h"
#include "gm_internal.h"
#include "gm_malloc_debug.h"

Functions

GM_ENTRY_POINT void * gm_alloc_pages (gm_size_t alloc_len)
GM_ENTRY_POINT void gm_free_pages (void *addr, gm_size_t alloc_len)

Detailed Description


Function Documentation

GM_ENTRY_POINT void* gm_alloc_pages gm_size_t    alloc_len
 

gm_alloc_pages() allocates a page-aligned buffer of length ALLOC_LEN, where ALLOC_LEN is a multiple of GM_PAGE_LEN. Any fractional page following the buffer is wasted.

Return values:
ptr  Pointer to the allocated buffer.
0  Error occurred.
Parameters:
alloc_len  (IN) The length of buffer to be allocated.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_free_pages void *    addr,
gm_size_t    alloc_len
 

gm_free_pages() frees the pages at addr, which were previously allocated with gm_alloc_pages().

Parameters:
addr  (IN) The address of the buffer to be freed.
alloc_len  (IN) The length (in bytes) of the buffer to be freed.
See also:
gm_alloc_pages
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)


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