MCPcopy Index your code
hub / github.com/git/git / xcalloc

Function xcalloc

wrapper.c:146–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void *xcalloc(size_t nmemb, size_t size)
147{
148 void *ret;
149
150 if (unsigned_mult_overflows(nmemb, size))
151 die("data too large to fit into virtual memory space");
152
153 memory_limit_check(size * nmemb, 0);
154 ret = calloc(nmemb, size);
155 if (!ret && (!nmemb || !size))
156 ret = calloc(1, 1);
157 if (!ret)
158 die("Out of memory, calloc failed");
159 return ret;
160}
161
162void xsetenv(const char *name, const char *value, int overwrite)
163{

Callers 15

unix_ss_createFunction · 0.85
prepare_bitmap_gitFunction · 0.85
prepare_midx_bitmap_gitFunction · 0.85
path_msgFunction · 0.85
merge_startFunction · 0.85
make_trie_nodeFunction · 0.85
push_stack_elementFunction · 0.85
if_atom_handlerFunction · 0.85
alloc_state_allocFunction · 0.85
create_pack_fileFunction · 0.85
remove_redundant_no_genFunction · 0.85
cache_treeFunction · 0.85

Calls 2

memory_limit_checkFunction · 0.85
dieFunction · 0.70

Tested by 5

client__multipleFunction · 0.68
cmd__hash_speedFunction · 0.68
add_delay_entryFunction · 0.68