#include <stddef.h>
#include <string.h>
Go to the source code of this file.
Functions | |
void * | sat_malloc (size_t) |
malloc exits with error message on error | |
void * | sat_malloc2 (size_t, size_t) |
void * | sat_calloc (size_t, size_t) |
void * | sat_realloc (void *, size_t) |
void * | sat_realloc2 (void *, size_t, size_t) |
void * | sat_free (void *) |
void | sat_oom (size_t, size_t) |
unsigned int | sat_timems (unsigned int subtract) |
void | sat_sort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *, void *), void *compard) |
char * | sat_dupjoin (const char *str1, const char *str2, const char *str3) |
char * | sat_dupappend (const char *str1, const char *str2, const char *str3) |
int | sat_hex2bin (const char **strp, unsigned char *buf, int bufl) |
char * | sat_bin2hex (const unsigned char *buf, int l, char *str) |
static void * | sat_extend (void *buf, size_t len, size_t nmemb, size_t size, size_t block) |
static void * | sat_zextend (void *buf, size_t len, size_t nmemb, size_t size, size_t block) |
extend an array by reallocation and zero's the new section buf old pointer len current size nmbemb number of elements to add size size of each element block block size used to allocate the elements | |
static void * | sat_extend_resize (void *buf, size_t len, size_t size, size_t block) |
static void * | sat_calloc_block (size_t len, size_t size, size_t block) |
void* sat_malloc | ( | size_t | ) |
malloc exits with error message on error
Definition at line 30 of file util.c.
References sat_oom().
Referenced by map_init_clone(), pool_addfileprovides_dep(), pool_id2langid(), repo_add_solv_flags(), sat_dupjoin(), and sat_malloc2().
void* sat_malloc2 | ( | size_t | , | |
size_t | ||||
) |
Definition at line 39 of file util.c.
References sat_malloc(), and sat_oom().
Referenced by pool_shrink_whatprovides(), queue_alloc_one(), queue_init_clone(), repo_add_solv_flags(), repodata_internalize(), repopagestore_read_or_setup_pages(), sat_calloc_block(), and transaction_init_clone().
void* sat_calloc | ( | size_t | , | |
size_t | ||||
) |
Definition at line 67 of file util.c.
References sat_oom().
Referenced by addchoicerules(), create_transaction_info(), datamatcher_init(), makewatches(), map_init(), policy_create_obsolete_index(), pool_arch2color_slow(), pool_create(), pool_createwhatprovides(), pool_set_languages(), pool_setarch(), pool_trivial_installable_noobsoletesmap(), rel2id(), repo_add_solv_flags(), repo_create(), repodata_create_stubs(), repodata_initdata(), repodata_internalize(), repodata_schema2id(), sat_chksum_create(), solvable_lookup_str_poollang(), solver_addupdaterule(), solver_create(), solver_create_decisions_obsoletesmap(), solver_fill_DU_cb(), stringpool_strn2id(), transaction_init_clone(), and transaction_order().
void* sat_realloc | ( | void * | , | |
size_t | ||||
) |
Definition at line 47 of file util.c.
References sat_oom().
Referenced by incore_add_blob(), incore_add_id(), incore_add_u32(), map_grow(), pool_alloctmpspace(), pool_queuetowhatprovides(), pool_setarch(), pool_shrink_whatprovides(), repo_add_solv_flags(), sat_realloc2(), str2id(), and strn2id().
void* sat_realloc2 | ( | void * | , | |
size_t | , | |||
size_t | ||||
) |
Definition at line 59 of file util.c.
References sat_oom(), and sat_realloc().
Referenced by pool_addfileprovides_search(), queue_alloc_one(), queue_insertn(), rel2id(), repo_add_solv_flags(), repo_create(), repodata_create(), repodata_free_schemahash(), repodata_key2id(), repopagestore_load_page_range(), sat_extend(), sat_extend_resize(), and solvable_lookup_str_poollang().
void* sat_free | ( | void * | ) |
Definition at line 80 of file util.c.
Referenced by create_transaction_info(), datamatcher_free(), datamatcher_init(), dirpool_free(), dirpool_free_dirtraverse(), makewatches(), map_free(), pool_addfileprovides_ids(), pool_calc_duchanges(), pool_free(), pool_freeidhashes(), pool_freewhatprovides(), pool_set_languages(), pool_setarch(), pool_shrink_whatprovides(), queue_free(), rel2id(), repo_add_solv_flags(), repo_empty(), repo_freeallrepos(), repo_freedata(), repodata_create_stubs(), repodata_free_schemahash(), repodata_freedata(), repodata_internalize(), repodata_shrink(), repopagestore_free(), sat_chksum_free(), sat_dupappend(), solver_fill_DU_cb(), solver_free(), stringpool_free(), stringpool_freehash(), stringpool_strn2id(), transaction_free(), transaction_free_orderdata(), and transaction_order().
void sat_oom | ( | size_t | , | |
size_t | ||||
) |
Definition at line 19 of file util.c.
Referenced by sat_calloc(), sat_malloc(), sat_malloc2(), sat_realloc(), and sat_realloc2().
unsigned int sat_timems | ( | unsigned int | subtract | ) |
Definition at line 88 of file util.c.
Referenced by create_solutions(), pool_addfileprovides_ids(), pool_createwhatprovides(), repo_add_solv_flags(), solver_solve(), and transaction_order().
void sat_sort | ( | void * | base, | |
size_t | nmemb, | |||
size_t | size, | |||
int(*)(const void *, const void *, void *) | compar, | |||
void * | compard | |||
) |
Definition at line 140 of file util.c.
References sat_sort_data::compar, sat_sort_data::compard, and sat_sort_helper().
char* sat_dupjoin | ( | const char * | str1, | |
const char * | str2, | |||
const char * | str3 | |||
) |
char* sat_dupappend | ( | const char * | str1, | |
const char * | str2, | |||
const char * | str3 | |||
) |
int sat_hex2bin | ( | const char ** | strp, | |
unsigned char * | buf, | |||
int | bufl | |||
) |
char* sat_bin2hex | ( | const unsigned char * | buf, | |
int | l, | |||
char * | str | |||
) |
static void* sat_extend | ( | void * | buf, | |
size_t | len, | |||
size_t | nmemb, | |||
size_t | size, | |||
size_t | block | |||
) | [inline, static] |
Definition at line 38 of file util.h.
References sat_realloc2().
Referenced by addteedge(), data_addblob(), data_addid(), dirpool_add_dir(), pool_add_solvable(), pool_add_solvable_block(), pool_addfileprovides_dep(), pool_addfileprovides_ids(), pool_calc_duchanges(), rel2id(), repo_addid(), repo_reserve_ids(), repo_sidedata_extend(), repodata_add_array(), repodata_add_dirstr(), repodata_extend(), repodata_insert_keyid(), repodata_new_handle(), repodata_schema2id(), repodata_set_bin_checksum(), repodata_set_binary(), repodata_set_str(), sat_zextend(), solver_addrule(), stringpool_strn2id(), and transaction_order().
static void* sat_zextend | ( | void * | buf, | |
size_t | len, | |||
size_t | nmemb, | |||
size_t | size, | |||
size_t | block | |||
) | [inline, static] |
extend an array by reallocation and zero's the new section buf old pointer len current size nmbemb number of elements to add size size of each element block block size used to allocate the elements
Definition at line 61 of file util.h.
References sat_extend().
static void* sat_extend_resize | ( | void * | buf, | |
size_t | len, | |||
size_t | size, | |||
size_t | block | |||
) | [inline, static] |
Definition at line 68 of file util.h.
References sat_realloc2().
Referenced by dirpool_add_dir(), dirpool_make_dirtraverse(), pool_calc_duchanges(), pool_create(), pool_shrink_rels(), repo_addid(), repo_reserve_ids(), repodata_extend(), repodata_schema2id(), repodata_shrink(), solver_create(), solver_unifyrules(), stringpool_clone(), stringpool_init(), and stringpool_shrink().
static void* sat_calloc_block | ( | size_t | len, | |
size_t | size, | |||
size_t | block | |||
) | [inline, static] |
Definition at line 75 of file util.h.
References sat_malloc2().
Referenced by dirpool_make_dirtraverse(), pool_createwhatprovides(), repo_sidedata_create(), repodata_extend_block(), repodata_get_attrp(), and repodata_new_handle().