memory.h File Reference
`#include <gwenhywfar/gwenhywfarapi.h>`

Go to the source code of this file.

## Macros

#define | GWEN_FREE_OBJECT(varname)
#define | GWEN_MEM_FREE(varname)
#define | GWEN_MEM_NEW(typ, memptr)
#define | GWEN_NEW_OBJECT(typ, varname)

## Functions

GWENHYWFAR_API void | GWEN_Memory_dealloc (void *p)
GWENHYWFAR_API void * | GWEN_Memory_malloc (size_t dsize)
GWENHYWFAR_API void * | GWEN_Memory_realloc (void *oldp, size_t nsize)
GWENHYWFAR_API char * | GWEN_Memory_strdup (const char *s)

## Macro Definition Documentation

## GWEN_FREE_OBJECT

#define GWEN_FREE_OBJECT | ( |  | varname | ) |

Value:
GWEN_Memory_dealloc((void*)varname);
GWEN_Memory_dealloc
GWENHYWFAR_API void GWEN_Memory_dealloc(void *p)

Definition at line 61 of file memory.h.

## GWEN_MEM_FREE

#define GWEN_MEM_FREE | ( |  | varname | ) |

Value:
GWEN_Memory_dealloc((void*)varname);

Definition at line 51 of file memory.h.

## GWEN_MEM_NEW

#define GWEN_MEM_NEW | ( |  | typ,
|  |  | memptr )

Value:
memptr=(typ*)GWEN_Memory_malloc(sizeof(typ));
GWEN_Memory_malloc
GWENHYWFAR_API void * GWEN_Memory_malloc(size_t dsize)

Definition at line 48 of file memory.h.

## GWEN_NEW_OBJECT

#define GWEN_NEW_OBJECT | ( |  | typ,
|  |  | varname )

Value:
{\
varname=(typ*)GWEN_Memory_malloc(sizeof(typ)); \
memset(varname, 0, sizeof(typ));\
}

Definition at line 55 of file memory.h.

## Function Documentation

## GWEN_Memory_dealloc()

GWENHYWFAR_API void GWEN_Memory_dealloc | ( | void * | p | ) |

References GWENHYWFAR_API.

## GWEN_Memory_malloc()

GWENHYWFAR_API void * GWEN_Memory_malloc | ( | size_t | dsize | ) |

References GWENHYWFAR_API.

## GWEN_Memory_realloc()

GWENHYWFAR_API void * GWEN_Memory_realloc | ( | void * | oldp,
|  | size_t | nsize )

References GWENHYWFAR_API.

## GWEN_Memory_strdup()

GWENHYWFAR_API char * GWEN_Memory_strdup | ( | const char * | s | ) |

References GWENHYWFAR_API.