<code>optional string allocator_name = 1;</code>
172220
public java.lang.String getAllocatorName() {
    java.lang.Object ref = allocatorName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      allocatorName_ = s;
      return s;
    }
  }
1294952
static List<String> integer(String name, @Nullable Integer value) {
    if (value != null) {
      return Arrays.asList("--" + name, value.toString());
    }
    return Collections.emptyList();
  }
448940
@Override
    public AllocationPoint allocateMemory(DataBuffer buffer, AllocationShape requiredMemory, AllocationStatus location,
                    boolean initialize) {
        AllocationPoint point = new AllocationPoint();

        useTracker.set(System.currentTimeMillis());

        // we use these longs as tracking codes for memory tracking
        Long allocId = objectsTracker.getAndIncrement();
        //point.attachBuffer(buffer);
        point.setObjectId(allocId);
        point.setShape(requiredMemory);
        /*
        if (buffer instanceof CudaIntDataBuffer) {
            buffer.setConstant(true);
            point.setConstant(true);
        }
        */
        /*int numBuckets = configuration.getNumberOfGcThreads();
        int bucketId = RandomUtils.nextInt(0, numBuckets);

        GarbageBufferReference reference =
                        new GarbageBufferReference((BaseDataBuffer) buffer, queueMap.get(bucketId), point);*/
        //point.attachReference(reference);
        point.setDeviceId(-1);

        if (buffer.isAttached()) {
            long reqMem = AllocationUtils.getRequiredMemory(requiredMemory);
            //log.info("Allocating {} bytes from attached memory...", reqMem);

            // workaround for init order
            getMemoryHandler().getCudaContext();
            point.setDeviceId(Nd4j.getAffinityManager().getDeviceForCurrentThread());

            val workspace = (CudaWorkspace) Nd4j.getMemoryManager().getCurrentWorkspace();

            val pair = new PointersPair();

            val ptrDev = workspace.alloc(reqMem, MemoryKind.DEVICE, requiredMemory.getDataType(), initialize);
            //val addr = ptrDev.address();
            //log.info("Allocated device pointer: {}; Divider: {}; ReqMem: {}; ReqMem divider: {};", addr, addr % 8, reqMem, reqMem % 8);
            val ptrHost = workspace.alloc(reqMem, MemoryKind.HOST, requiredMemory.getDataType(), initialize);

            pair.setHostPointer(ptrHost);
            if (ptrDev != null) {
                pair.setDevicePointer(ptrDev);
                point.setAllocationStatus(AllocationStatus.DEVICE);
            } else {
                pair.setDevicePointer(ptrHost);
                point.setAllocationStatus(AllocationStatus.HOST);
            }

            point.setAttached(true);

            point.setPointers(pair);
        } else {
            // we stay naive on PointersPair, we just don't know on this level, which pointers are set. MemoryHandler will be used for that
            PointersPair pair = memoryHandler.alloc(location, point, requiredMemory, initialize);
            point.setPointers(pair);
        }

        allocationsMap.put(allocId, point);
        //point.tickHostRead();
        point.tickDeviceWrite();
        return point;
    }
623604
@Override
    public boolean isConst(String name)
    {
        Slot slot = slotMap.query(name, 0);
        if (slot == null) {
            return false;
        }
        return (slot.getAttributes() & (PERMANENT|READONLY)) ==
                                       (PERMANENT|READONLY);

    }
58554
public T add(String str) {
    requireNonNull(str, JVM_OPTION_NOT_NULL_ERROR_MESSAGE);
    String value = str.trim();
    if (isInvalidOption(value)) {
      throw new IllegalArgumentException("a JVM option can't be empty and must start with '-'");
    }
    checkMandatoryOptionOverwrite(value);
    options.add(value);

    return castThis();
  }
1305786
@Override
    public Pointer allocate(long bytes, MemoryKind kind, boolean initialize) {
        Pointer ptr = NativeOpsHolder.getInstance().getDeviceNativeOps().mallocHost(bytes, 0);

        if (ptr == null || ptr.address() == 0L)
            throw new OutOfMemoryError("Failed to allocate [" + bytes + "] bytes");

        //log.info("Allocating {} bytes at MemoryManager", bytes);

        if (initialize)
            Pointer.memset(ptr, 0, bytes);

        return ptr;
    }
231427
@javax.annotation.Nonnull
    public java.util.Optional<net.morimekta.providence.model.FilePos> optionalValueStartPos() {
        return java.util.Optional.ofNullable(mValueStartPos);
    }
542585
public static Optional<String> asStringValue(Attribute a) {
    class Visitor extends SimpleAnnotationValueVisitor8<String, Void> {
      @Override
      public String visitString(String s, Void unused) {
        return s;
      }
    }
    return Optional.ofNullable(a.accept(new Visitor(), null));
  }
718938
@javax.annotation.Nonnull
    public java.util.Optional<java.util.Map<String,String>> optionalNamespaces() {
        return java.util.Optional.ofNullable(mNamespaces);
    }
43971
public void allocateMemory(int memorySize) {
	this.memorySize = memorySize;
	memory = new PairDblInt[memorySize][numLabels];
	
	for (int i = 0; i < memorySize; i++) {
	    for (int j = 0; j < numLabels; j++) {
		memory[i][j] = new PairDblInt();
	    }
	}
    }
504305
public Optional<String> getFieldName(int fieldIndex) {
		if (fieldIndex < 0 || fieldIndex >= fieldNames.length) {
			return Optional.empty();
		}
		return Optional.of(fieldNames[fieldIndex]);
	}
218076
public Optional<String> arg(final String name) {
		int index = _args.indexOf("--" + name);
		if (index == -1) index = _args.indexOf("-" + name);

		return index >= 0 && index < _args.length() - 1
			? Optional.of(_args.get(index + 1))
			: Optional.empty();
	}
404200
public PooledByteBuffer allocate() {
        final Queue<Slice> sliceQueue = this.sliceQueue;
        final Slice slice = sliceQueue.poll();
        if (slice == null && (maxRegions <= 0 || regionUpdater.getAndIncrement(this) < maxRegions)) {
            final int bufferSize = this.bufferSize;
            final int buffersPerRegion = this.buffersPerRegion;
            final ByteBuffer region = allocator.allocate(buffersPerRegion * bufferSize);
            int idx = bufferSize;
            for (int i = 1; i < buffersPerRegion; i ++) {
                sliceQueue.add(new Slice(region, idx, bufferSize));
                idx += bufferSize;
            }
            final Slice newSlice = new Slice(region, 0, bufferSize);
            return new PooledByteBuffer(newSlice, newSlice.slice(), sliceQueue);
        }
        if (slice == null) {
            return null;
        }
        return new PooledByteBuffer(slice, slice.slice(), sliceQueue);
    }
992938
public T alloc() {
    if (numFree == 0) {
      Preconditions.checkState(numAlloc < maxSize);
      numAlloc++;
      return allocator.get();
    } else {
      T item = free[numFree - 1];
      numFree--;
      return item;
    }
  }
200865
public void setName(String name) {

    if (name == null || name.trim().length() == 0) {
      throw new IllegalArgumentException("Job name cannot be empty.");
    }

    this.name = name;
  }
443553
public static String simpleName(String name) {
		if (name == null) {
			return null;
		}
		final int index = name.lastIndexOf('.');
		if (index > 0) {
			return name.substring(index + 1);
		}
		return name;
	}
179428
private long allocateRun(int normCapacity) {
        int d = maxOrder - (log2(normCapacity) - pageShifts);
        int id = allocateNode(d);
        if (id < 0) {
            return id;
        }
        freeBytes -= runLength(id);
        return id;
    }