@ Override public void purgeZeroObject ( Long bucketId , Long objectId , AllocationPoint point , boolean copyback ) { forget ( point , AllocationStatus . HOST ) ; flowController . waitTillReleased ( point ) ; // we call for caseless deallocation here //JCudaDriver.cuCtxSetCurrent(contextPool.getCuContextForDevice(0)); free ( point , AllocationStatus . HOST ) ; point . setAllocationStatus ( AllocationStatus . DEALLOCATED ) ; long reqMem = AllocationUtils . getRequiredMemory ( point . getShape ( ) ) * - 1 ; zeroUseCounter . addAndGet ( reqMem ) ; }
This method explicitly removes object from zero - copy memory .