private void TestAllocSuccess()
        {
            Skip.IfNot(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));

            IntPtr pointer = windowsProtectedMemoryAllocator.Alloc(1);

            try
            {
                // just do some sanity checks
                Marshal.WriteByte(pointer, 0, 1);
                Assert.Equal(1, Marshal.ReadByte(pointer, 0));
            }
            finally
            {
                windowsProtectedMemoryAllocator.Free(pointer, 1);
            }
        }
        private void TestAllocSuccess()
        {
            if (windowsProtectedMemoryAllocator == null)
            {
                return;
            }

            IntPtr pointer = windowsProtectedMemoryAllocator.Alloc(1);

            try
            {
                // just do some sanity checks
                Marshal.WriteByte(pointer, 0, 1);
                Assert.Equal(1, Marshal.ReadByte(pointer, 0));
            }
            finally
            {
                windowsProtectedMemoryAllocator.Free(pointer, 1);
            }
        }