Пример #1
0
        public ReservedRegion(IJitMemoryAllocator allocator, ulong maxSize, ulong granularity = 0)
        {
            if (granularity == 0)
            {
                granularity = DefaultGranularity;
            }

            Block            = allocator.Reserve(maxSize);
            _maxSize         = maxSize;
            _sizeGranularity = granularity;
            _currentSize     = 0;
        }
Пример #2
0
        public NativeContext(IJitMemoryAllocator allocator)
        {
            _block = allocator.Allocate((ulong)Unsafe.SizeOf <NativeCtxStorage>());

            GetStorage().ExclusiveAddress = ulong.MaxValue;
        }
Пример #3
0
 public NativeContext(IJitMemoryAllocator allocator)
 {
     _block = allocator.Allocate(TotalSize);
 }
Пример #4
0
 public NativeContext(IJitMemoryAllocator allocator)
 {
     _block = allocator.Allocate((ulong)Unsafe.SizeOf <NativeCtxStorage>());
 }