This is the global code registry that stores information for all loaded code objects that are currently in use by any `Store` in the current process. The purpose of this map is to be called from signal handlers to determine whether a program counter is a wasm trap or not. Specifically macOS has no contextual information about the thread available, hence the necessity for global state rather than
()
| 372 | // registry. When a `ModuleRegistry` is destroyed then all of its entries |
| 373 | // are removed from the global registry. |
| 374 | fn global_code() -> &'static RwLock<GlobalRegistry> { |
| 375 | static GLOBAL_CODE: OnceLock<RwLock<GlobalRegistry>> = OnceLock::new(); |
| 376 | GLOBAL_CODE.get_or_init(Default::default) |
| 377 | } |
| 378 | |
| 379 | type GlobalRegistry = TryBTreeMap<usize, (usize, Arc<CodeMemory>)>; |
| 380 |
no test coverage detected