pub unsafe fn heap_validate(ptr: *const u8) -> Result<(), HeapError>Expand description
Validate a heap object’s structural integrity.
Checks:
- Non-null pointer
- Valid tag byte
- Non-zero size
- Size consistent with field count
- Closure code_ptr is non-null
Does NOT follow field pointers (use heap_validate_deep for that).
§Safety
ptr must point to readable memory of at least size bytes.