Memory protection in allocator