make DefaultAllocator public and add a default constructor
This commit is contained in:
parent
755114c1a3
commit
f00f02de77
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,7 @@ import java.nio.ByteBuffer;
|
|||
|
||||
import org.capnproto.BuilderArena.AllocationStrategy;
|
||||
|
||||
class DefaultAllocator implements Allocator {
|
||||
public class DefaultAllocator implements Allocator {
|
||||
|
||||
// (minimum) number of bytes in the next allocation
|
||||
private int nextSize = BuilderArena.SUGGESTED_FIRST_SEGMENT_WORDS;
|
||||
|
@ -18,6 +18,8 @@ class DefaultAllocator implements Allocator {
|
|||
public AllocationStrategy allocationStrategy =
|
||||
AllocationStrategy.GROW_HEURISTICALLY;
|
||||
|
||||
public DefaultAllocator() {}
|
||||
|
||||
public DefaultAllocator(AllocationStrategy allocationStrategy) {
|
||||
this.allocationStrategy = allocationStrategy;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue