pub struct Carved;Expand description
A size-classed free list that carves its blocks out of larger chunks, for a program that runs and ends.
The blocks a program keeps alive are carved, not asked for one at a
time (task-2191). Pooled asks the system for every block its lists do
not hold, and a statement that keeps what it builds, such as an .import of
50,000 rows held for one bulk build, empties every list at once and sends
each value to the Windows heap: the heap was 38% of the import. This takes
64 KiB from the system for a class whose list is empty and hands out blocks
from it, so a block costs a pointer bump.
Freed blocks are kept, not given back. A carved block is part of a chunk
and the system cannot take it alone, so a class keeps every block it has
carved, which is at most the most of that class the program held at once.
That is why the command line and the shell install it and the MCP server,
which runs for as long as its client does, keeps Pooled.
Trait Implementations§
Source§impl GlobalAlloc for Carved
impl GlobalAlloc for Carved
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
layout. Read more