use raw_block.rs for the heap backend

This commit is contained in:
Mark Thom
2020-02-16 16:30:36 -07:00
parent 5f51e264f2
commit 8902bcb5ab
12 changed files with 353 additions and 170 deletions

View File

@@ -5,9 +5,13 @@ use std::mem;
use std::ptr;
pub(crate) trait RawBlockTraits {
fn init_size() -> usize;
fn init_size() -> usize;
fn align() -> usize;
fn base_offset(base: *const u8) -> *const u8;
#[inline]
fn base_offset(base: *const u8) -> *const u8 {
base
}
}
pub(crate) struct RawBlock<T: RawBlockTraits> {