Package org.apache.sysds.runtime.ooc.memory

# Class GlobalMemoryBroker

java.lang.Object
org.apache.sysds.runtime.ooc.memory.GlobalMemoryBroker

All Implemented Interfaces:
  `MemoryBroker`

public class GlobalMemoryBroker extends Object implements MemoryBroker

## Constructor Summary

Constructors
Constructor
Description
`GlobalMemoryBroker(long allowedBytes)`

## Method Summary

Modifier and Type
Method
Description
`void`
`attachAllowance(MemoryAllowance allowance)`
`void`
`destroyAllowance(MemoryAllowance allowance, long freedMemory)`
`void`
`freeMemory(MemoryAllowance allowance, long freedMemory)`
`static GlobalMemoryBroker`
`get()`
`long`
`requestMemory(MemoryAllowance allowance, long minSize, long maxSize)`
`void`
`shutdownAllowance(MemoryAllowance allowance)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### GlobalMemoryBroker

public GlobalMemoryBroker(long allowedBytes)

## Method Details

### get

public static GlobalMemoryBroker get()

### requestMemory

public long requestMemory(MemoryAllowance allowance, long minSize, long maxSize)

Specified by:
  `requestMemory` in interface `MemoryBroker`

### freeMemory

public void freeMemory(MemoryAllowance allowance, long freedMemory)

Specified by:
  `freeMemory` in interface `MemoryBroker`

### shutdownAllowance

public void shutdownAllowance(MemoryAllowance allowance)

Specified by:
  `shutdownAllowance` in interface `MemoryBroker`

### destroyAllowance

public void destroyAllowance(MemoryAllowance allowance, long freedMemory)

Specified by:
  `destroyAllowance` in interface `MemoryBroker`

### attachAllowance

public void attachAllowance(MemoryAllowance allowance)

Specified by:
  `attachAllowance` in interface `MemoryBroker`