Beispiel #1
0
        public void Setup()
        {
            int AllocatorSize = Bytes * 2;
            var defaultAlloc  = Allocator.Default;

            if (defaultAlloc == null)
            {
                throw new Exception("Null default allocator");
            }

            heapAllocator      = DefaultHeapAllocator.Instance;
            localAllocator     = DefaultLocalAllocator.Instance;
            cAllocator         = DefaultCppAllocator.Instance;
            arenaAllocator     = new ArenaAllocator(AllocatorSize);
            stackAllocator     = new StackAllocator(AllocatorSize);
            fixedPoolAllocator = new FixedMemoryPoolAllocator(10, AllocatorSize);
            poolAllocator      = new MemoryPoolAllocator(AllocatorSize);
        }
 public void Setup()
 {
     allocator = new MemoryPoolAllocator(1000);
 }