libdebian-installer
|
Modules | |
Memory chunk allocer | |
Macros | |
#define | di_new(struct_type, n_structs) ((struct_type *) di_malloc (sizeof (struct_type) * (n_structs))) |
#define | di_new0(struct_type, n_structs) ((struct_type *) di_malloc0 (sizeof (struct_type) * (n_structs))) |
#define | di_renew(struct_type, mem, n_structs) ((struct_type *) di_realloc ((mem), sizeof (struct_type) * (n_structs))) |
Functions | |
void * | di_malloc (size_t n_bytes) __attribute__((malloc)) |
void * | di_malloc0 (size_t n_bytes) __attribute__((malloc)) |
void * | di_realloc (void *mem, size_t n_bytes) __attribute__((malloc)) |
void | di_free (void *mem) |
#define di_new | ( | struct_type, | |
n_structs | |||
) | ((struct_type *) di_malloc (sizeof (struct_type) * (n_structs))) |
struct_type | returned type |
n_structs | number of returned structs |
Referenced by di_hash_table_new_full(), di_list_append(), di_list_prepend(), di_log_set_handler(), di_mem_chunk_new(), di_slist_append(), di_slist_prepend(), di_stradup(), and di_tree_new_full().
#define di_new0 | ( | struct_type, | |
n_structs | |||
) | ((struct_type *) di_malloc0 (sizeof (struct_type) * (n_structs))) |
struct_type | returned type |
n_structs | number of returned structs |
Referenced by di_list_alloc(), di_packages_alloc(), di_release_alloc(), di_slist_alloc(), and internal_di_packages_allocator_alloc().
#define di_renew | ( | struct_type, | |
mem, | |||
n_structs | |||
) | ((struct_type *) di_realloc ((mem), sizeof (struct_type) * (n_structs))) |
struct_type | returned type |
mem | current memory pointer |
n_structs | number of returned structs |
void di_free | ( | void * | mem | ) |
Free memory
mem | memory |
Referenced by di_hash_table_destroy(), di_list_destroy(), di_list_free(), di_packages_allocator_free(), di_packages_free(), di_release_free(), di_slist_destroy(), di_slist_free(), and di_tree_destroy().
void* di_malloc | ( | size_t | n_bytes | ) |
Allocate memory
n_bytes | size in bytes |
References di_error.
Referenced by di_mem_chunk_alloc().
void* di_malloc0 | ( | size_t | n_bytes | ) |
void* di_realloc | ( | void * | mem, |
size_t | n_bytes | ||
) |