}
AsyncExecutor.fork(new ParallelTask() {
@Override
public void execute(int taskNum, int taskCount) throws IOException, ClassNotFoundException {
SerializerCollector collector = new SerializerCollector(mmap.getAddr(), mmap.getSize());
for (int i = taskNum; i < capacity; i += taskCount) {
long currentPtr = mapBase + (long) i * 8;
for (long entry; (entry = unsafe.getAddress(currentPtr)) != 0; currentPtr = entry + NEXT_OFFSET) {
collector.setOffset(entry + headerSize(entry));
serializer.read(collector);
}
}
synchronized (serializers) {
serializers.addAll(collector.serializers());
}
}
});
SerializeStream ss = new SerializeStream(mmap.getAddr() + CUSTOM_DATA_OFFSET, MAX_CUSTOM_DATA_SIZE);