Add "hook" module.

The hook module allows a low-reader-overhead way of finding hooks to invoke and
calling them.

For now, none of the allocation pathways are tied into the hooks; this will come
later.
This commit is contained in:
David Goldblatt
2018-04-09 19:11:46 -07:00
committed by David Goldblatt
parent 06a8c40b36
commit 5ae6e7cbfa
6 changed files with 443 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
#include "jemalloc/internal/ctl.h"
#include "jemalloc/internal/extent_dss.h"
#include "jemalloc/internal/extent_mmap.h"
#include "jemalloc/internal/hook.h"
#include "jemalloc/internal/jemalloc_internal_types.h"
#include "jemalloc/internal/log.h"
#include "jemalloc/internal/malloc_io.h"
@@ -1311,6 +1312,7 @@ malloc_init_hard_a0_locked() {
malloc_mutex_rank_exclusive)) {
return true;
}
hook_boot();
/*
* Create enough scaffolding to allow recursive allocation in
* malloc_ncpus().