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

Function xrealloc

wrapper.c:130–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void *xrealloc(void *ptr, size_t size)
131{
132 void *ret;
133
134 if (!size) {
135 free(ptr);
136 return xmalloc(0);
137 }
138
139 memory_limit_check(size, 0);
140 ret = realloc(ptr, size);
141 if (!ret)
142 die("Out of memory, realloc failed");
143 return ret;
144}
145
146void *xcalloc(size_t nmemb, size_t size)
147{

Callers 9

traverse_by_cache_treeFunction · 0.85
xml_start_tagFunction · 0.85
reencode_string_iconvFunction · 0.85
do_read_blobFunction · 0.85
subst_from_stdinFunction · 0.85
parse_binary_hunkFunction · 0.85
precompose_utf8_readdirFunction · 0.85
store_objectFunction · 0.85
try_deltaFunction · 0.85

Calls 3

memory_limit_checkFunction · 0.85
xmallocFunction · 0.70
dieFunction · 0.70

Tested by

no test coverage detected