fn allocate(len: usize) -> Result<Vec<u8>>
Allocates a zeroed buffer of len bytes without aborting when memory runs out.
len