Patch for Review: JvGetStringUTF and JvTempCString
Mohan Embar
gnustuff@thisiscool.com
Tue Aug 12 17:21:00 GMT 2003
Hi People,
>I think that stack size in a thread might be limited to one megabyte.
>We probably wouldn't want any stack-allocated string to be a
>significant fraction of that, so perhaps the limit should be 1k or
>10k. This might be significant in a complex parser, for instance.
1. So are we okay with the approach where:
- the helper class allocates 256 bytes on the stack and tries to cram
the string in there if it fits
- if it doesn't fit, allocate some memory using either _Jv_Malloc() or
_Jv_AllocBytes()
2. Shall I try to run some crude timings so see whether _Jv_Malloc() or
_Jv_AllocBytes() is a faster?
3. Since we seem to be in agreement about JvGetStringUTFChars()
in cni.h, shall I submit separate patches for this and _Jv_TempUTFString?
Since Danny's FileDescriptor patch and my MinGW cleanup + networking
patch are dependent on the resolution of this, I'm anxious to put this
thing to bed, even if it means holding off on _Jv_TempUTFString for now
and putting it back in win32.h.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
More information about the Java-patches
mailing list