mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-22 02:42:12 +03:00
Add forking handling for counter module
This commit is contained in:
parent
2097e1945b
commit
4d970f8bfc
3 changed files with 26 additions and 0 deletions
|
|
@ -20,3 +20,18 @@ counter_accum_init(counter_accum_t *counter, uint64_t interval) {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
counter_prefork(tsdn_t *tsdn, counter_accum_t *counter) {
|
||||
LOCKEDINT_MTX_PREFORK(tsdn, counter->mtx);
|
||||
}
|
||||
|
||||
void
|
||||
counter_postfork_parent(tsdn_t *tsdn, counter_accum_t *counter) {
|
||||
LOCKEDINT_MTX_POSTFORK_PARENT(tsdn, counter->mtx);
|
||||
}
|
||||
|
||||
void
|
||||
counter_postfork_child(tsdn_t *tsdn, counter_accum_t *counter) {
|
||||
LOCKEDINT_MTX_POSTFORK_CHILD(tsdn, counter->mtx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue