| 2451 | } |
| 2452 | |
| 2453 | static int |
| 2454 | arenas_create_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp, |
| 2455 | size_t *oldlenp, void *newp, size_t newlen) { |
| 2456 | int ret; |
| 2457 | extent_hooks_t *extent_hooks; |
| 2458 | unsigned arena_ind; |
| 2459 | |
| 2460 | malloc_mutex_lock(tsd_tsdn(tsd), &ctl_mtx); |
| 2461 | |
| 2462 | extent_hooks = (extent_hooks_t *)&extent_hooks_default; |
| 2463 | WRITE(extent_hooks, extent_hooks_t *); |
| 2464 | if ((arena_ind = ctl_arena_init(tsd, extent_hooks)) == UINT_MAX) { |
| 2465 | ret = EAGAIN; |
| 2466 | goto label_return; |
| 2467 | } |
| 2468 | READ(arena_ind, unsigned); |
| 2469 | |
| 2470 | ret = 0; |
| 2471 | label_return: |
| 2472 | malloc_mutex_unlock(tsd_tsdn(tsd), &ctl_mtx); |
| 2473 | return ret; |
| 2474 | } |
| 2475 | |
| 2476 | static int |
| 2477 | arenas_lookup_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp, |
nothing calls this directly
no test coverage detected