Skip to main content

Module mem

Module mem 

Source
Expand description

Short lived memory.

For work whose size is not known until it runs, and which is finished with the memory by the time it returns. Allocating for each such call can cost more than the work itself.

Functionsยง

take_slice
Takes a len element slice of T off the front of bytes, aligning first, and returns it along with what is left.
with_scratch
Calls f with a zeroed block of size bytes.
with_scratch_dyn ๐Ÿ”’
Calls f with a zeroed block of size bytes, through a trait object so that the buckets below are compiled once rather than once per caller.