Functions

/build/buildd-opendnssec_1.3.2-1~bpo60+1-s390-eF9Mr1/opendnssec-1.3.2/signer/src/shared/allocator.c File Reference

#include "config.h"
#include "shared/allocator.h"
#include "shared/log.h"
#include <stdlib.h>
#include <string.h>
Include dependency graph for allocator.c:

Go to the source code of this file.

Functions

allocator_typeallocator_create (void *(*allocator)(size_t size), void(*deallocator)(void *))
void * allocator_alloc (allocator_type *allocator, size_t size)
void * allocator_alloc_zero (allocator_type *allocator, size_t size)
void * allocator_alloc_init (allocator_type *allocator, size_t size, const void *init)
char * allocator_strdup (allocator_type *allocator, const char *string)
void allocator_deallocate (allocator_type *allocator, void *data)
void allocator_cleanup (allocator_type *allocator)

Function Documentation

void* allocator_alloc ( allocator_type allocator,
size_t  size 
)
void* allocator_alloc_init ( allocator_type allocator,
size_t  size,
const void *  init 
)

Allocate memory and initialize with data.

Definition at line 106 of file allocator.c.

References allocator_alloc().

Referenced by allocator_strdup().

void* allocator_alloc_zero ( allocator_type allocator,
size_t  size 
)

Allocate memory and initialize to zero.

Definition at line 90 of file allocator.c.

References allocator_alloc().

void allocator_cleanup ( allocator_type allocator  ) 
allocator_type* allocator_create ( void *(*)(size_t size)  allocator,
void(*)(void *)  deallocator 
)
void allocator_deallocate ( allocator_type allocator,
void *  data 
)
char* allocator_strdup ( allocator_type allocator,
const char *  string 
)