memory_type_index: u32,
}
+impl Default for VulkanSuperBlockInfo {
+ fn default() -> Self {
+ Self {
+ memory: vk::DeviceMemory::null(),
+ mapped_ptr: std::ptr::null_mut(),
+ non_linear: false,
+ memory_type_index: !0,
+ }
+ }
+}
+
#[derive(Clone)]
pub struct VulkanMemoryDedicated {
memory: vk::DeviceMemory,
pub struct SuperBlock<T>
where
- T: Copy,
+ T: Copy + Default,
{
_first_block_index: BlockIndex,
pub user_data: T,
impl<T> Index<SuperBlockIndex> for Vec<SuperBlock<T>>
where
- T: Copy,
+ T: Copy + Default,
{
type Output = SuperBlock<T>;
impl<T> IndexMut<SuperBlockIndex> for Vec<SuperBlock<T>>
where
- T: Copy,
+ T: Copy + Default,
{
#[inline(always)]
fn index_mut(&mut self, index: SuperBlockIndex) -> &mut Self::Output {
pub struct Tlsf<T>
where
- T: Copy,
+ T: Copy + Default,
{
bitmap_0: u32,
bitmap_1: [u32; BIN_COUNT],
impl<T> Default for Tlsf<T>
where
- T: Copy,
+ T: Copy + Default,
{
fn default() -> Self {
Self::new()
impl<T> Tlsf<T>
where
- T: Copy,
+ T: Copy + Default,
{
pub fn new() -> Self {
Self {