You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MaulingMonkey edited this page May 2, 2025
·
1 revision
Mulling over allocator-related operations, current traits, possible future traits, etc.
Parameterization
Init flavor:
Zeroed (always available by combining alloc with memset)
Debug Pattern Filled (always available by combining alloc with e.g. memset)
Uninit (always available, but might use an alternative memory flavor)
Sizing:
NonZeroUsize | NonZeroU32 - always available, but may OOM
usize | u32 - may always fail for some allocators. Rounding up to size 1 via adapters is sane, but not for FFI allocators, which might be incompatible with sized frees.
(element_size, element_count) - some allocators expose this directly