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


Mohan Embar writes:
 > >It depends on how long the string might be.  We don't want Java to
 > >generate stack overflows.  It's a nice featre of Java that stack sizes
 > >are usually small.
 > 
 > ...which would be another argument in favor of encapsulating this
 > by a class instead of a macro. Do we have any idea what we'd want
 > the maximum size of any stack-allocated string to be?

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.

Andrew.


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