private void TestCheckPointerWithRegularPointerShouldSucceed()
        {
            IntPtr pointer = libcProtectedMemoryAllocator.Alloc(1);

            try
            {
                libcProtectedMemoryAllocator.CheckIntPtr(pointer, "blah");
            }
            finally
            {
                libcProtectedMemoryAllocator.Free(pointer, 1);
            }
        }
예제 #2
0
        private void TestCheckPointerWithRegularPointerShouldSucceed()
        {
            // Don't run libc tests on platforms that don't match libc/posix behaviors
            if (libc == null)
            {
                return;
            }

            IntPtr pointer = libcProtectedMemoryAllocator.Alloc(1);

            try
            {
                libcProtectedMemoryAllocator.CheckIntPtr(pointer, "blah");
            }
            finally
            {
                libcProtectedMemoryAllocator.Free(pointer, 1);
            }
        }