Skip to main content

reserve

Function reserve 

Source
pub fn reserve<const N: usize>(
    client: &Client,
    bytes: [usize; N],
) -> Result<[Handle; N], ThroughputError>
Expand description

Reserves a probe’s buffers outside every pool: each is its own device allocation, returned to the driver once the probe drops it.

A probe’s gigabyte is no part of any workload. Held in a pool it would stay reserved after the probe, and grow the pages an adaptive memory carves every later allocation from. Dedicated, it exists exactly as long as the probe does.

§Errors

ThroughputError::Allocation when the device has no room for them. A reservation is only enqueued, and one that fails still leaves a handle, over which a launch does nothing: the probe would time an empty pass and cache it as the device’s peak.