public MemoryHolder(int size) { RuntimeHelpers.PrepareConstrainedRegions(); try { } finally { _size = size; _data = NativeFunctions.Calloc(new IntPtr(size)); if (_data == IntPtr.Zero) { GC.SuppressFinalize(this); throw new OutOfMemoryException(); } _ownsData = true; } }