OpenDNSSEC-signer 1.3.0
|
#include "config.h"
#include <stdlib.h>
Go to the source code of this file.
Data Structures | |
struct | allocator_struct |
Typedefs | |
typedef struct allocator_struct | allocator_type |
Functions | |
allocator_type * | allocator_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) |
typedef struct allocator_struct allocator_type |
Memory management.
Definition at line 41 of file allocator.h.
void* allocator_alloc | ( | allocator_type * | allocator, |
size_t | size | ||
) |
Allocate memory.
[in] | allocator | the allocator |
[in] | size | size to allocate |
Allocate memory.
Definition at line 67 of file allocator.c.
References allocator_struct::allocator, ods_fatal_exit(), and ods_log_assert.
Referenced by adapter_create(), allocator_alloc_init(), allocator_alloc_zero(), cmdhandler_create(), denial_create(), domain_create(), duration_create(), engine_config(), fifoq_create(), key_create(), key_recover(), keylist_create(), main(), nsec3params_create(), parse_conf_adapters(), rrset_create(), rrsigs_create(), schedule_create(), signconf_create(), task_create(), worker_create(), zone_create(), zonedata_create(), and zonelist_create().
void* allocator_alloc_init | ( | allocator_type * | allocator, |
size_t | size, | ||
const void * | init | ||
) |
Allocate memory and initialize with data.
[in] | allocator | the allocator |
[in] | size | size to allocate |
[in] | init | initialized data |
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.
[in] | allocator | the allocator |
[in] | size | size to allocate |
Allocate memory and initialize to zero.
Definition at line 90 of file allocator.c.
References allocator_alloc().
void allocator_cleanup | ( | allocator_type * | allocator | ) |
Cleanup allocator.
[in] | allocator | the allocator |
Cleanup allocator.
Definition at line 153 of file allocator.c.
References allocator_struct::deallocator.
Referenced by adapter_cleanup(), adapter_create(), denial_cleanup(), denial_create(), domain_cleanup(), domain_create(), duration_cleanup(), duration_create(), engine_cleanup(), main(), nsec3params_cleanup(), nsec3params_create(), rrset_cleanup(), rrset_create(), rrsigs_cleanup(), rrsigs_create(), signconf_cleanup(), signconf_create(), task_cleanup(), task_create(), zone_cleanup(), zone_create(), and zonelist_update().
allocator_type* allocator_create | ( | void *(*)(size_t size) | allocator, |
void(*)(void *) | deallocator | ||
) |
Create allocator.
[in] | allocator | function for allocating |
[in] | deallocator | function for deallocating |
Create allocator.
Definition at line 48 of file allocator.c.
References allocator_struct::allocator, allocator_struct::deallocator, and ods_log_error().
Referenced by adapter_create(), denial_create(), domain_create(), duration_create(), main(), nsec3params_create(), rrset_create(), rrsigs_create(), signconf_create(), task_create(), zone_create(), and zonelist_update().
void allocator_deallocate | ( | allocator_type * | allocator, |
void * | data | ||
) |
Deallocate memory.
[in] | allocator | the allocator |
[in] | data | memory to deallocate |
Deallocate memory.
Definition at line 136 of file allocator.c.
References allocator_struct::deallocator, and ods_log_assert.
Referenced by adapter_cleanup(), cmdhandler_cleanup(), denial_cleanup(), domain_cleanup(), duration_cleanup(), engine_cleanup(), engine_config_cleanup(), fifoq_cleanup(), keylist_cleanup(), main(), nsec3params_cleanup(), rrset_cleanup(), rrsigs_cleanup(), schedule_cleanup(), signconf_cleanup(), task_cleanup(), worker_cleanup(), zone_cleanup(), zonedata_cleanup(), zonelist_cleanup(), and zonelist_free().
char* allocator_strdup | ( | allocator_type * | allocator, |
const char * | string | ||
) |
Duplicate string.
[in] | allocator | the allocator |
[in] | string |
Duplicate string.
Definition at line 122 of file allocator.c.
References allocator_alloc_init().
Referenced by adapter_create(), engine_config(), key_create(), key_recover(), parse_conf_chroot(), parse_conf_clisock_filename(), parse_conf_group(), parse_conf_log_filename(), parse_conf_notify_command(), parse_conf_pid_filename(), parse_conf_username(), parse_conf_working_dir(), parse_conf_zonefetch_filename(), parse_conf_zonelist_filename(), parse_sc_nsec3_salt(), parse_sc_soa_serial(), rrsigs_add_sig(), task_create(), zone_create(), and zone_recover().