Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xen/xmalloc: XMEM_POOL_POISON improvements
When in use, the spew: (XEN) Assertion '!memchr_inv(b->ptr.buffer + MIN_BLOCK_SIZE, POISON_BYTE, (b->size & BLOCK_SIZE_MASK) - MIN_BLOCK_SIZE)' failed at common/xmalloc_tlsf.c:246 is unweidly and likely meaningless to non-Xen developers. Therefore: * Switch to IS_ENABLED(). There's no need for full #ifdef-ary. * Pull memchr_inv() out into the if(), and provide an error message which clearly states that corruption has been found. * XMEM_POOL_POISON can be enabled in release builds. Use printk()+BUG() so it doesn't silently stop working when assertions are compiled out. Signed-off-by: Andrew Cooper <[email protected]> Reviewed-by: Julien Grall <[email protected]>
- Loading branch information