Closed BeneficialCode closed 1 year ago
If we change the bitmap_size in Config.rom, then the code will raise a index out of bounds panic. Cause you create_shm, then return a fixed size [u8;65536] array. How can we solve this problem? I'm not familiar with rust.
The chatgpt tell me the answer. : )
let ptr: *mut u8 = trace_bits.cast(); (shm_id, std::slice::from_raw_parts_mut(ptr,bitmap_size))
If we change the bitmap_size in Config.rom, then the code will raise a index out of bounds panic. Cause you create_shm, then return a fixed size [u8;65536] array. How can we solve this problem? I'm not familiar with rust.