internal static MutexHandle Allocate() { var result = default(MutexHandle); result.AttributePointer = Memory.AllocHGlobal(pthread_get_mutexattr_size()); result.MutexPointer = Memory.AllocHGlobal(pthread_get_mutex_size()); return(result); }
/// <summary> /// Allocates unmanaged memory. /// </summary> /// <param name="size">The number of bytes to allocate.</param> public static IntPtr AllocHGlobal(int size) { return((IntPtr)Memory.AllocHGlobal((ulong)size)); }