public void CtorAgeOutPeriod() { TestRuntime.AssertSystemVersion(PlatformName.MacOSX, 10, 8, throwIfOtherPlatform: false); using (var mp = new CMMemoryPool(TimeSpan.FromSeconds(40))) { var allocator = mp.GetAllocator(); var ptr = allocator.Allocate(2); Assert.AreNotEqual(IntPtr.Zero, ptr); allocator.Deallocate(ptr); } }
public void Ctor() { TestRuntime.AssertSystemVersion(ApplePlatform.MacOSX, 10, 8, throwIfOtherPlatform: false); using (var mp = new CMMemoryPool()) { var allocator = mp.GetAllocator(); var ptr = allocator.Allocate(55); Assert.AreNotEqual(IntPtr.Zero, ptr); allocator.Deallocate(ptr); } }
public void CtorAgeOutPeriod() { if (!TestRuntime.CheckSystemAndSDKVersion(6, 0)) { Assert.Inconclusive("EntryPointNotFoundException : CMMemoryPoolCreate before 6.0"); } using (var mp = new CMMemoryPool(TimeSpan.FromSeconds(40))) { var allocator = mp.GetAllocator(); var ptr = allocator.Allocate(2); Assert.AreNotEqual(IntPtr.Zero, ptr); allocator.Deallocate(ptr); } }