custom mem allocator for smallhash