| 2654 | } |
| 2655 | |
| 2656 | JEMALLOC_ALWAYS_INLINE bool |
| 2657 | imalloc_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. */ |
| 2674 | JEMALLOC_ALWAYS_INLINE int |
no test coverage detected