public class ContiguousBlockAllocator extends Object implements BlockAllocator
Modifier and Type | Class and Description |
---|---|
static class |
ContiguousBlockAllocator.Factory |
Constructor and Description |
---|
ContiguousBlockAllocator(int size) |
ContiguousBlockAllocator(int size,
int pos) |
Modifier and Type | Method and Description |
---|---|
int |
alloc() |
int |
alloc(int n)
Allocates a new bus.
|
void |
debug() |
void |
free(int address)
Frees a bus, that is makes it available again for
new re-allocation.
|
List |
getAllocatedBlocks()
Queries a list of allocated blocks.
|
de.sciss.jcollider.ContiguousBlockAllocator.Block |
reserve(int address) |
de.sciss.jcollider.ContiguousBlockAllocator.Block |
reserve(int address,
int size) |
public ContiguousBlockAllocator(int size)
public ContiguousBlockAllocator(int size, int pos)
public int alloc()
public int alloc(int n)
BlockAllocator
alloc
in interface BlockAllocator
n
- the number of
channels to allocate. must
be greater than zero.-1
if the allocator ran out of busses.public de.sciss.jcollider.ContiguousBlockAllocator.Block reserve(int address)
public de.sciss.jcollider.ContiguousBlockAllocator.Block reserve(int address, int size)
public void free(int address)
BlockAllocator
free
in interface BlockAllocator
address
- the index of the buspublic List getAllocatedBlocks()
BlockAllocator
getAllocatedBlocks
in interface BlockAllocator
Block
public void debug()
Copyright © 2015–2022 SciJava. All rights reserved.