include/OffscreenGecko/geckomem.h File Reference

Gecko memory allocator access. More...

#include <memory.h>
#include "baseobj.h"

Go to the source code of this file.

Namespaces

namespace  OSGK

Classes

struct  OSGK::GeckoMem
 Gecko memory allocator access. More...
struct  OSGK_GeckoMem
 Gecko memory allocator access. More...

Functions

void * osgk_geckomem_alloc (OSGK_GeckoMem *mem, size_t size)
 Allocate some memory using Gecko's memory allocator.
static void * osgk_geckomem_clone (OSGK_GeckoMem *mem, const void *p, size_t size)
 Allocate some memory using Gecko's memory allocator and copy some data into into it.
void osgk_geckomem_free (OSGK_GeckoMem *mem, void *p)
 Free memory allocated using Gecko's memory allocator.
void * osgk_geckomem_realloc (OSGK_GeckoMem *mem, void *p, size_t size)
 Reallocate a block of memory allocated with Gecko's memory allocator with a new size.


Detailed Description

Gecko memory allocator access.


Function Documentation

void* osgk_geckomem_alloc ( OSGK_GeckoMem mem,
size_t  size 
)

Allocate some memory using Gecko's memory allocator.

Parameters:
mem Allocator object.
size Amount of memory to allocate.
Returns:
Allocated block of memory or 0 if out of memory.

static void* osgk_geckomem_clone ( OSGK_GeckoMem mem,
const void *  p,
size_t  size 
) [inline, static]

Allocate some memory using Gecko's memory allocator and copy some data into into it.

Parameters:
mem Allocator object.
p Data to copy.
size Amount of memory to allocate and size of data to copy.
Returns:
Allocated block of memory or 0 if out of memory.

void osgk_geckomem_free ( OSGK_GeckoMem mem,
void *  p 
)

Free memory allocated using Gecko's memory allocator.

Parameters:
mem Allocator object.
p Block of memory to free.

void* osgk_geckomem_realloc ( OSGK_GeckoMem mem,
void *  p,
size_t  size 
)

Reallocate a block of memory allocated with Gecko's memory allocator with a new size.

Parameters:
mem Allocator object.
p Block of memory to reallocate.
size New amount of memory.
Returns:
Re-allocated block of memory or 0 if the reallocation failed.


Generated on Sun Nov 2 18:15:18 2008 for OffscreenGecko by  doxygen 1.5.4