protected void init(int keyLen, long sizeMemBytes, int numberOfElems) { checkThread(); numElem = 0; bytezOffset = FILE_HEADER_LEN; freeList = new FreeList(); // FIXME: missing merge/split of different block sizes alloc = new MallocBytezAllocator(); memory = alloc.alloc(sizeMemBytes); customHeader = memory.slice(CORE_HEADER_LEN,CUSTOM_FILEHEADER_LEN); tmpValueBytez = new BytezByteSource(memory,0,0); this.keyLen = keyLen; index = new OffHeapByteTree(keyLen,OffHeapByteTree.estimateMBytesForIndex(keyLen,numberOfElems)); memory.putInt(4, HEADER_TAG); }
protected void init(int keyLen, long sizeMemBytes, int numberOfElems) { checkThread(); numElem = 0; bytezOffset = FILE_HEADER_LEN; freeList = new FreeList(); // FIXME: missing merge/split of different block sizes alloc = new MallocBytezAllocator(); memory = alloc.alloc(sizeMemBytes); customHeader = memory.slice(CORE_HEADER_LEN,CUSTOM_FILEHEADER_LEN); tmpValueBytez = new BytezByteSource(memory,0,0); this.keyLen = keyLen; index = new OffHeapByteTree(keyLen,OffHeapByteTree.estimateMBytesForIndex(keyLen,numberOfElems)); memory.putInt(4, HEADER_TAG); }
retransTemplate.setSeqNo(-1); packetAllocator = new FSTStructAllocator(10, new MallocBytezAllocator()); readBuffer = packetAllocator.newArray(historySize,template); this.nodeId = packetAllocator.newStruct( new StructString(Packet.MAX_NODE_NAME_LEN) );
retransTemplate.setSeqNo(-1); packetAllocator = new FSTStructAllocator(10, new MallocBytezAllocator()); readBuffer = packetAllocator.newArray(historySize,template); this.nodeId = packetAllocator.newStruct( new StructString(Packet.MAX_NODE_NAME_LEN) );
template.setTopic(topic); offheapAllocator = new FSTStructAllocator(0, new MallocBytezAllocator()); heapAllocator = new FSTStructAllocator(0);
template.setTopic(topic); offheapAllocator = new FSTStructAllocator(0, new MallocBytezAllocator()); heapAllocator = new FSTStructAllocator(0);