Commit 9fb87f81 authored by pjulien's avatar pjulien

size the allocation to the required bytes

parent b0146b3d
......@@ -95,7 +95,7 @@ public class Table {
int required = (int)((float)length * decoder.maxCharsPerByte());
CharBuffer dst = CHAR_BUFFER.get();
if (dst == null || dst.capacity() < required) {
dst = CharBuffer.allocate(Math.max(required, 128));
dst = CharBuffer.allocate(required);
CHAR_BUFFER.set(dst);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment