/home/mandrake/rpm/BUILD/sc68-2.2.1/file68/alloc68.h File Reference

memory allocation handler. More...

Go to the source code of this file.

Typedefs

typedef void *(* sc68_alloc_t )(unsigned int)
 Alloc function (malloc).
typedef void(* sc68_free_t )(void *)
 Free function (free).

Functions

void * SC68alloc (unsigned int n)
 Allocate dynamic memory.
void SC68free (void *data)
 Free dynamic memory.
sc68_alloc_t SC68set_alloc (sc68_alloc_t alloc)
 Set/get dynamic memory allocation handler.
sc68_free_t SC68set_free (sc68_free_t free)
 Set/get dynamic memory free handler.


Detailed Description

memory allocation handler.

Author:
Benjamin Gerard
Date:
2003/04/11
Id
alloc68.h,v 2.3 2003/08/30 01:27:08 benjihan Exp

SC68 memory allocation handler module provides function to allocate and free memory buffer.


Typedef Documentation

typedef void*(* sc68_alloc_t)(unsigned int)

Alloc function (malloc).

typedef void(* sc68_free_t)(void *)

Free function (free).


Function Documentation

void* SC68alloc ( unsigned int  n  ) 

Allocate dynamic memory.

The SC68alloc() function calls user defined dynamic memory allocation handler.

Parameters:
n Size of buffer to allocate.
Returns:
pointer to allocated memory buffer.
Return values:
0 error
See also:
SC68set_alloc()

SC68free()

void SC68free ( void *  data  ) 

Free dynamic memory.

The SC68free() function calls user defined dynamic memory free handler.

Parameters:
data Previously allocated memory buffer.
Returns:
pointer to allocated memory
Return values:
0 Failure.
See also:
SC68set_free()

SC68alloc()

sc68_alloc_t SC68set_alloc ( sc68_alloc_t  alloc  ) 

Set/get dynamic memory allocation handler.

Parameters:
alloc Set new alloc handler (0:get old value).
Returns:
previous alloc handler.
See also:
SC68alloc()

sc68_free_t SC68set_free ( sc68_free_t  free  ) 

Set/get dynamic memory free handler.

Parameters:
free Set new free handler (0:get old value).
Returns:
previous free handler.
See also:
SC68free()


Generated on Wed Feb 25 08:20:09 2009 for sc68fordevelopers by  doxygen 1.5.8