Macro scratchpad::array_len_for_markers [−][src]
Returns the minimum number of elements of a given type necessary for tracking of at least the specified number of allocation markers. The actual supported marker count may be larger due to padding.
Examples
#[macro_use] extern crate scratchpad; use scratchpad::CacheAligned; let len = array_len_for_markers!(CacheAligned, 16); #[cfg(target_pointer_width = "32")] assert_eq!(len, 1); #[cfg(target_pointer_width = "64")] assert_eq!(len, 2);