Null-terminated Unicode strings in java.io on Windows
Robert Lougher
rob.lougher at gmail.com
Fri Jan 25 19:01:22 UTC 2008
Hi,
This is getting a bit hostile for no reason.... Thinking about
alignment gives an interesting solution.
1) Strings are not null-terminated
2) For most strings the alignment gives the VM room to terminate in
place when GetStringChars is called
3) Copy strings that can't be terminated in place.
On average, you'll need to copy 1/<alignment> strings.
Rob.
More information about the core-libs-dev
mailing list