guangli-dai
6206ffb9a8
Reformat the codebase with the clang-format 18.
2026-03-05 12:45:36 -08:00
Qi Wang
602edd7566
Enabled -Wstrict-prototypes and fixed warnings.
2023-07-06 12:00:02 -07:00
David Goldblatt
40e7aed59e
TSD: Move in some of the tcache fields.
...
We had put these in the tcache for cache optimization reasons. After the
previous diff, these no longer apply.
2020-04-14 15:20:19 -07:00
David Goldblatt
d1e11d48d4
Move tsd link and in_hook after tcache.
...
This can lead to better cache utilization down the common paths where we don't
touch the link.
2018-06-27 13:39:02 -07:00
David Goldblatt
a7f749c9af
Hooks: Protect against reentrancy.
...
Previously, we made the user deal with this themselves, but that's not good
enough; if hooks may allocate, we should test the allocation pathways down
hooks. If we're doing that, we might as well actually implement the protection
for the user.
2018-05-18 11:43:03 -07:00
David Goldblatt
59e371f463
Hooks: Add a hook exhaustion test.
...
When we run out of space in which to store hooks, we should return EAGAIN from
the mallctl, but not otherwise misbehave.
2018-05-18 11:43:03 -07:00
David Goldblatt
126e9a84a5
Hooks: move the "extra" pointer into the hook_t itself.
...
This simplifies the mallctl call to install a hook, which should only take a
single argument.
2018-05-18 11:43:03 -07:00
David Goldblatt
fe0e399385
Hooks: add an early-exit path for the common no-hook case.
2018-05-18 11:43:03 -07:00
David Goldblatt
5ae6e7cbfa
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.
2018-05-18 11:43:03 -07:00