MCPcopy Create free account
hub / github.com/beefytech/Beef / imalloc_init_check

Function imalloc_init_check

BeefRT/JEMalloc/src/jemalloc.c:2656–2671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2654}
2655
2656JEMALLOC_ALWAYS_INLINE bool
2657imalloc_init_check(static_opts_t *sopts, dynamic_opts_t *dopts) {
2658 if (unlikely(!malloc_initialized()) && unlikely(malloc_init())) {
2659 if (config_xmalloc && unlikely(opt_xmalloc)) {
2660 malloc_write(sopts->oom_string);
2661 abort();
2662 }
2663 UTRACE(NULL, dopts->num_items * dopts->item_size, NULL);
2664 set_errno(ENOMEM);
2665 *dopts->result = NULL;
2666
2667 return false;
2668 }
2669
2670 return true;
2671}
2672
2673/* Returns the errno-style error code of the allocation. */
2674JEMALLOC_ALWAYS_INLINE int

Callers 1

imallocFunction · 0.85

Calls 4

malloc_initializedFunction · 0.85
malloc_initFunction · 0.85
malloc_writeFunction · 0.85
set_errnoFunction · 0.85

Tested by

no test coverage detected