public class DeviceAllocationsTracker extends Object
Constructor and Description |
---|
DeviceAllocationsTracker(Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
long |
addToAllocation(Long threadId,
Integer deviceId,
long memorySize) |
protected void |
addToReservedSpace(Integer deviceId,
long memorySize) |
protected void |
ensureThreadRegistered(Long threadId,
Integer deviceId) |
long |
getAllocatedSize(Integer deviceId) |
long |
getAllocatedSize(Long threadId,
Integer deviceId) |
long |
getReservedSpace(Integer deviceId) |
boolean |
reserveAllocationIfPossible(Long threadId,
Integer deviceId,
long memorySize)
This method "reserves" memory within allocator
|
long |
subFromAllocation(Long threadId,
Integer deviceId,
long memorySize) |
protected void |
subFromReservedSpace(Integer deviceId,
long memorySize) |
public DeviceAllocationsTracker(@NonNull Configuration configuration)
public long addToAllocation(@NonNull Long threadId, Integer deviceId, long memorySize)
public boolean reserveAllocationIfPossible(Long threadId, Integer deviceId, long memorySize)
threadId
- deviceId
- memorySize
- public long getAllocatedSize(Integer deviceId)
public long getReservedSpace(Integer deviceId)
protected void addToReservedSpace(Integer deviceId, long memorySize)
protected void subFromReservedSpace(Integer deviceId, long memorySize)
Copyright © 2016. All Rights Reserved.