mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
HPA: Implement batch deallocation.
This saves O(n) mutex locks/unlocks during SEC flush.
This commit is contained in:
committed by
David Goldblatt
parent
f47b4c2cd8
commit
1944ebbe7f
@@ -144,13 +144,6 @@ sec_do_flush_locked(tsdn_t *tsdn, sec_t *sec, sec_shard_t *shard) {
|
||||
edata_list_active_concat(&to_flush, &shard->freelist[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
* A better way to do this would be to add a batch dalloc function to
|
||||
* the pai_t. Practically, the current method turns into O(n) locks and
|
||||
* unlocks at the fallback allocator. But some implementations (e.g.
|
||||
* HPA) can straightforwardly do many deallocations in a single lock /
|
||||
* unlock pair.
|
||||
*/
|
||||
pai_dalloc_batch(tsdn, sec->fallback, &to_flush);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user