Skip to main content

RING_BUFFER_REGION_SIZE

Constant RING_BUFFER_REGION_SIZE 

Source
pub const RING_BUFFER_REGION_SIZE: usize = _; // 262_152usize
Expand description

Total byte size of the shared ring buffer region.

The region consists of a SHARED_HEADER_SIZE-byte cursor header (head: u32, tail: u32, little-endian) followed by DEFAULT_CAPACITY bytes of circular payload area. Guests that import martensite.ring_memory must declare at least ceil(RING_BUFFER_REGION_SIZE / 65536) pages.

ยงExamples

use martensite_plugin::runtime::RING_BUFFER_REGION_SIZE;
use martensite_plugin::DEFAULT_CAPACITY;

assert_eq!(RING_BUFFER_REGION_SIZE, DEFAULT_CAPACITY + 8);