PAI/SEC: Add a dalloc_batch function.

This lets the SEC flush all of its items in a single call, rather than flushing
everything at once.
This commit is contained in:
David Goldblatt 2021-01-04 18:40:27 -08:00 committed by David Goldblatt
parent 4b8870c7db
commit f47b4c2cd8
11 changed files with 69 additions and 11 deletions

13
src/pai.c Normal file
View file

@ -0,0 +1,13 @@
#include "jemalloc/internal/jemalloc_preamble.h"
#include "jemalloc/internal/jemalloc_internal_includes.h"
void
pai_dalloc_batch_default(tsdn_t *tsdn, pai_t *self,
edata_list_active_t *list) {
edata_t *edata;
while ((edata = edata_list_active_first(list)) != NULL) {
edata_list_active_remove(list, edata);
pai_dalloc(tsdn, self, edata);
}
}