| 478 | } |
| 479 | |
| 480 | void |
| 481 | base_stats_get(tsdn_t *tsdn, base_t *base, size_t *allocated, size_t *resident, |
| 482 | size_t *mapped, size_t *n_thp) { |
| 483 | cassert(config_stats); |
| 484 | |
| 485 | malloc_mutex_lock(tsdn, &base->mtx); |
| 486 | assert(base->allocated <= base->resident); |
| 487 | assert(base->resident <= base->mapped); |
| 488 | *allocated = base->allocated; |
| 489 | *resident = base->resident; |
| 490 | *mapped = base->mapped; |
| 491 | *n_thp = base->n_thp; |
| 492 | malloc_mutex_unlock(tsdn, &base->mtx); |
| 493 | } |
| 494 | |
| 495 | void |
| 496 | base_prefork(tsdn_t *tsdn, base_t *base) { |