This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch for Review: JvGetStringUTF and JvTempCString
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Bryce McKinlay <bryce at mckinlay dot net dot nz>, tromey at redhat dot com, java-patches at gcc dot gnu dot org
- Date: Tue, 12 Aug 2003 12:05:32 -0500
- Subject: Re: Patch for Review: JvGetStringUTF and JvTempCString
- Reply-to: gnustuff at thisiscool dot com
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/