fred-mod-eppd
|
Functions | |
void * | epp_malloc (void *pool, unsigned size) |
void * | epp_calloc (void *pool, unsigned size) |
char * | epp_strdup (void *pool, const char *str) |
char * | epp_strcat (void *pool, const char *str1, const char *str2) |
char * | epp_sprintf (void *pool, const char *fmt,...) |
A memory allocated by these functions is automatically freed when processing of request is finished.
void* epp_calloc | ( | void * | pool, |
unsigned | size | ||
) |
Allocate memory from memory pool and prezero it.
pool | Memory pool. |
size | Number of bytes to allocate. |
Wrapper around apache's apr_pcalloc() which allocates memory from a pool.
This function is exported in header file to be used by other modules which are not aware of apache pools.
pool | Apache pool pointer. |
size | Size of chunk to allocate. |
void* epp_malloc | ( | void * | pool, |
unsigned | size | ||
) |
Allocate memory from memory pool.
pool | Memory pool. |
size | Number of bytes to allocate. |
char* epp_sprintf | ( | void * | pool, |
const char * | fmt, | ||
... | |||
) |
Print formatted string.
pool | Memory pool. |
fmt | Format of string. |
Wrapper around apache's apr_pvsprintf() which prints formated string.
This function is exported in header file to be used by other modules which are not aware of apache pools.
pool | Apache pool pointer. |
fmt | Format of string. |
char* epp_strcat | ( | void * | pool, |
const char * | str1, | ||
const char * | str2 | ||
) |
Concatenate two strings in arguments, the memory will be allocated from memory pool.
In case of memory allocation failure or if one of arguments is NULL the function returns NULL.
pool | Memory pool. |
str1 | String which will be the first one. |
str2 | String which will be appended. |
Wrapper around apache's apr_pstrcat() which concatenates strings.
This function is exported in header file to be used by other modules which are not aware of apache pools.
pool | Apache pool pointer. |
str1 | First concatenated string. |
str2 | Second concatenated string. |
char* epp_strdup | ( | void * | pool, |
const char * | str | ||
) |
Duplicate string from argument, the memory will be allocated from memory pool.
pool | Memory pool. |
str | String which is going to be duplicated. |
Wrapper around apache's apr_strdup() which allocates memory from a pool.
This function is exported in header file to be used by other modules which are not aware of apache pools.
pool | Apache pool pointer. |
str | String which is going to be duplicated. |