Fixup constructor arguments

This commit is contained in:
Daniël de Kok 2024-07-17 07:42:24 +00:00
parent 27ef5aa029
commit 959b9dc25f
1 changed files with 3 additions and 3 deletions

View File

@ -242,16 +242,16 @@ pub struct PrefixCacheAllocator {
}
impl PrefixCacheAllocator {
pub fn new(block_size: usize, n_blocks: usize, window_size: Option<u32>) -> Self {
pub fn new(block_size: u32, n_blocks: u32, window_size: Option<u32>) -> Self {
if window_size.is_some() {
unimplemented!("Window size not supported in the prefix-caching block allocator yet");
}
PrefixCacheAllocator {
allocations: HashMap::new(),
block_size,
block_size: block_size as usize,
cache_blocks: HashMap::new(),
free_blocks: (1..n_blocks as u32).collect(),
free_blocks: (1..n_blocks).collect(),
leaves: BTreeSet::new(),
time: 0,
}