/** Calls {@code deallocate(true)}. */ public void deallocate() { deallocate(true); } /**
/** Calls {@code deallocate()}. */ @Override public void close() { deallocate(); }
deallocator = new Deallocator() { public void deallocate() { p.deallocate(); } }; }
@Override public void deallocate() { super.deallocate(); }
@Override public void deallocate(boolean deallocate) { super.deallocate(true); } }
/** Calls {@link Pointer#deallocate()} on all attached pointers, * as they are popped off the {@link #pointerStack}. */ public void deallocate() { if (logger.isDebugEnabled()) { logger.debug("Deallocating " + this); } while (pointerStack.size() > 0) { pointerStack.pop().deallocate(); } pointerStack = null; } }
deallocate(); throw new OutOfMemoryError("Failed to allocate memory within limits: totalBytes (" + formatBytes(DeallocatorReference.totalBytes) + " + " + formatBytes(r.bytes) + ") > maxBytes (" + formatBytes(maxBytes) + ")"); } else if (maxPhysicalBytes > 0 && lastPhysicalBytes > maxPhysicalBytes) { deallocate(); throw new OutOfMemoryError("Physical memory usage is too high: physicalBytes (" + formatBytes(lastPhysicalBytes) + ") > maxPhysicalBytes (" + formatBytes(maxPhysicalBytes) + ")");
/** * This method basically deallocates workspace memory * * @param extended */ @Override public void destroyWorkspace(boolean extended) { if (workspace.getHostPointer() != null && workspace.getHostPointer().getOriginalPointer() != null && workspace.getHostPointer().getOriginalPointer() instanceof BytePointer) workspace.getHostPointer().getOriginalPointer().deallocate(); workspace.setHostPointer(null); currentSize.set(0); reset(); if (extended) { clearExternalAllocations(); } //cycleAllocations.set(0); //maxCycle.set(0); }
@Override public void deallocate() { for (int i = 0; !isNull() && i < capacity; i++) { cudnnTensorStruct t = this.get(cudnnTensorStruct.class, i); checkCudnn(cudnnDestroyTensorDescriptor(t)); } if (owner != null) { owner.deallocate(); owner = null; } setNull(); } }
/** * This method basically deallocates workspace memory * * @param extended */ @Override public void destroyWorkspace(boolean extended) { if (workspace.getHostPointer() != null && workspace.getHostPointer().getOriginalPointer() != null && workspace.getHostPointer().getOriginalPointer() instanceof BytePointer) workspace.getHostPointer().getOriginalPointer().deallocate(); workspace.setHostPointer(null); currentSize.set(0); reset(); if (extended) { clearExternalAllocations(); } //cycleAllocations.set(0); //maxCycle.set(0); }