Add diagnostic scan cross-check of the Hermes counters -- FABRIC-3.6.md task 2.8
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
2a2bf6eb35
commit
feace42397
@@ -264,6 +264,21 @@ int sk_hermes_audit_values(uint64_t held, uint64_t pulled, uint64_t returned, ui
|
||||
int sk_hermes_audit(void);
|
||||
uint64_t sk_hermes_audit_failure_count(void);
|
||||
|
||||
/*
|
||||
* Task 2.8 (item 28), SXXXVII.4: the scan that verifies the counters
|
||||
* themselves. DIAGNOSTIC ONLY -- O(SK_HERMES_MSG_MAX), never called from
|
||||
* alloc/release/decay.
|
||||
*
|
||||
* sk_hermes_scan_held - walks the message arena and sums the live Stadium
|
||||
* cell heat of every in-use message (the ground truth `held` claims to
|
||||
* track). Sets *live_count (may be NULL) to the messages counted.
|
||||
*
|
||||
* sk_hermes_scan_check - nonzero iff the scan sum equals the `held`
|
||||
* counter exactly.
|
||||
*/
|
||||
uint64_t sk_hermes_scan_held(size_t *live_count);
|
||||
int sk_hermes_scan_check(void);
|
||||
|
||||
#endif /* __STARKERNEL__ */
|
||||
|
||||
#endif /* STARKERNEL_VM_KERNEL_HERMES_H */
|
||||
|
||||
Reference in New Issue
Block a user