Пример #1
0
        public D3D12MA_Allocation *Allocate(D3D12MA_AllocatorPimpl *allocator, ulong size, int wasZeroInitialized)
        {
            using var mutexLock = new D3D12MA_MutexLock(ref m_Mutex);

            var allocation = m_Allocator.Alloc();

            D3D12MA_Allocation._ctor(ref *allocation, allocator, size, wasZeroInitialized);

            return(allocation);
        }
Пример #2
0
 public void Free(D3D12MA_Allocation *alloc)
 {
     using var mutexLock = new D3D12MA_MutexLock(ref m_Mutex);
     m_Allocator.Free(alloc);
 }