MCPcopy Index your code
hub / github.com/dropbox/rust-alloc-no-stdlib / alloc_cell

Method alloc_cell

alloc-stdlib/src/test.rs:48–51  ·  view source on GitHub ↗
(&mut self, size:usize)

Source from the content-addressed store, hash-verified

46impl<Item:Default+Clone> Allocator<Item> for ItemVecAllocator<Item> {
47 type AllocatedMemory = ItemVec<Item>;
48 fn alloc_cell(&mut self, size:usize) ->ItemVec<Item>{
49 //eprint!("A:{}\n", size);
50 ItemVec(vec![Item::default();size])
51 }
52 fn free_cell(&mut self, _bv:ItemVec<Item>) {
53 //eprint!("F:{}\n", _bv.slice().len());
54 }

Callers 15

test_index_opsFunction · 0.45
heap_testFunction · 0.45
std_unsafe_heap_testFunction · 0.45
std_heap_testFunction · 0.45
show_heap_preallocFunction · 0.45
mainFunction · 0.45
stack_pool_testFunction · 0.45

Calls 1

ItemVecClass · 0.85

Tested by

no test coverage detected