private unsafe void SpaceCheck(byte *ptr, ulong sizeInBytes) { if ((ulong)this._numBytes < sizeInBytes) { SafeBuffer.NotEnoughRoom(); } if ((long)((byte *)ptr - (byte *)((void *)this.handle)) > (long)((ulong)this._numBytes - sizeInBytes)) { SafeBuffer.NotEnoughRoom(); } }
private unsafe void SpaceCheck(byte *ptr, ulong sizeInBytes) { if ((ulong)this._numBytes < sizeInBytes) { SafeBuffer.NotEnoughRoom(); } if ((ulong)(ptr - (byte *)(void *)this.handle) <= (ulong)this._numBytes - sizeInBytes) { return; } SafeBuffer.NotEnoughRoom(); }