MCPcopy Create free account
hub / github.com/boostorg/build / malloc

Function malloc

v2/engine/boehm_gc/malloc.c:304–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302 GC_debug_malloc(lb, RA "unknown", 0)
303
304void * malloc(size_t lb)
305 {
306 /* It might help to manually inline the GC_malloc call here. */
307 /* But any decent compiler should reduce the extra procedure call */
308 /* to at most a jump instruction in this case. */
309# if defined(I386) && defined(GC_SOLARIS_THREADS)
310 /*
311 * Thread initialisation can call malloc before
312 * we're ready for it.
313 * It's not clear that this is enough to help matters.
314 * The thread implementation may well call malloc at other
315 * inopportune times.
316 */
317 if (!GC_is_initialized) return sbrk(lb);
318# endif /* I386 && GC_SOLARIS_THREADS */
319 return((void *)REDIRECT_MALLOC(lb));
320 }
321
322#ifdef GC_LINUX_THREADS
323 static ptr_t GC_libpthread_start = 0;

Callers 8

copy_stringFunction · 0.85
tokenize_stringFunction · 0.85
real_mallocFunction · 0.85
backtrace_symbolsFunction · 0.85
reverseFunction · 0.85
testFunction · 0.85
leak_test.cFile · 0.85

Calls

no outgoing calls

Tested by 2

reverseFunction · 0.68
testFunction · 0.68