| 2225 | } |
| 2226 | |
| 2227 | JEMALLOC_ALWAYS_INLINE bool |
| 2228 | imalloc_init_check(static_opts_t *sopts, dynamic_opts_t *dopts) { |
| 2229 | if (unlikely(!malloc_initialized()) && unlikely(malloc_init())) { |
| 2230 | if (config_xmalloc && unlikely(opt_xmalloc)) { |
| 2231 | malloc_write(sopts->oom_string); |
| 2232 | abort(); |
| 2233 | } |
| 2234 | UTRACE(NULL, dopts->num_items * dopts->item_size, NULL); |
| 2235 | set_errno(ENOMEM); |
| 2236 | *dopts->result = NULL; |
| 2237 | |
| 2238 | return false; |
| 2239 | } |
| 2240 | |
| 2241 | return true; |
| 2242 | } |
| 2243 | |
| 2244 | /* Returns the errno-style error code of the allocation. */ |
| 2245 | JEMALLOC_ALWAYS_INLINE int |
no test coverage detected