This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for Review: JvGetStringUTF and JvTempCString


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/





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]