commit | 845ce3cbfd6972542b275c95eddfbb6e94469737 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Nov 13 17:07:00 2009 -0800 |
committer | Elliott Hughes <enh@google.com> | Fri Nov 13 17:12:48 2009 -0800 |
tree | 3f4c9ac0dd9f3787bacdb67b43ab76829ed4d608 | |
parent | 25c2a2dcfb56959cf34e4e5e5496335be46c5e5c [diff] |
Don't allocate arbitrary-length buffers on the stack. A new LocalArray C++ class lets us specify a "reasonable" amount of stack to use, but transparently fall back to using the heap if we need more space. The three places I've chosen to use LocalArray in this patch are fairly random; all they have in common is that they're the places where we call GetStringUTFRegion. There are more places LocalArray will be useful: the java.io.File JNI in particular. Bug: 2257819