Merge branch 'heapless-mem-pool' into restructure-embedded-examples
All checks were successful
Rust/sat-rs/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2024-05-21 19:50:01 +02:00
commit ddae74268a

View File

@ -388,7 +388,7 @@ pub mod heapless_mod {
static mut $pool_name: core::mem::MaybeUninit<[u8; $num_blocks * $block_size]> = static mut $pool_name: core::mem::MaybeUninit<[u8; $num_blocks * $block_size]> =
core::mem::MaybeUninit::new([0; $num_blocks * $block_size]); core::mem::MaybeUninit::new([0; $num_blocks * $block_size]);
static mut $sizes_list_name: core::mem::MaybeUninit<[usize; $num_blocks]> = static mut $sizes_list_name: core::mem::MaybeUninit<[usize; $num_blocks]> =
core::mem::MaybeUninit::new([satrs::pool::STORE_FREE; $num_blocks]); core::mem::MaybeUninit::new([$crate::pool::STORE_FREE; $num_blocks]);
}; };
($pool_name: ident, $sizes_list_name: ident, $num_blocks: expr, $block_size: expr, $meta_data: meta) => { ($pool_name: ident, $sizes_list_name: ident, $num_blocks: expr, $block_size: expr, $meta_data: meta) => {
#[$meta_data] #[$meta_data]
@ -1581,6 +1581,7 @@ mod tests {
#[cfg(feature = "heapless")] #[cfg(feature = "heapless")]
mod heapless_tests { mod heapless_tests {
use super::*; use super::*;
use crate::static_subpool;
use core::mem::MaybeUninit; use core::mem::MaybeUninit;
const SUBPOOL_1_BLOCK_SIZE: usize = 4; const SUBPOOL_1_BLOCK_SIZE: usize = 4;