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)
BlockAllocatoralloc in interface BlockAllocatorn - 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)
BlockAllocatorfree in interface BlockAllocatoraddress - the index of the buspublic List getAllocatedBlocks()
BlockAllocatorgetAllocatedBlocks in interface BlockAllocatorBlockpublic void debug()
Copyright © 2015–2022 SciJava. All rights reserved.