Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jemalloc: Clamp in malloc_usable_size() only if a tag is present
This behaviour should be safe and is useful for testing whether the bounds applied by jemalloc match what malloc_usable_size() reports. That is, one can validate bounds with a check like, assert(cheri_getlen(p) == malloc_usable_size(cheri_cleartag(p))); In particular, malloc_usable_size() will look up the usable size using allocator metadata, so it's handy to be able to compare that size with the capability bounds.
- Loading branch information