diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2020-12-08 15:44:35 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-18 13:46:56 -0500 |
commit | 4dc2bcca2e0576512ad55e20651eb9e18e2a0da4 (patch) | |
tree | 34a5d771759f83372cdde1a7da9a8aa16023f47f /includes | |
parent | 763d28551de32377a1dca8bdde02979e3686f400 (diff) | |
download | haskell-4dc2bcca2e0576512ad55e20651eb9e18e2a0da4.tar.gz |
rts: Add generic block traversal function, listAllBlocks
This function is exposed in the RtsAPI.h so that external users have a
blessed way to traverse all the different `bdescr`s which are known by
the RTS.
The main motivation is to use this function in ghc-debug but avoid
having to expose the internal structure of a Capability in the API.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/storage/GC.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h index 6bc7157bd6..6acfd10cea 100644 --- a/includes/rts/storage/GC.h +++ b/includes/rts/storage/GC.h @@ -163,6 +163,9 @@ extern generation * generations; extern generation * g0; extern generation * oldest_gen; +typedef void(*ListBlocksCb)(void *user, bdescr *); +void listAllBlocks(ListBlocksCb cb, void *user); + /* ----------------------------------------------------------------------------- Generic allocation |