Turn off fillOutStackTrace while initializing default exception objects
Thu Dec 21 22:15:00 GMT 2000
Filling out a stack trace while creating the exception objects in
main_init is redundant, because fillOutStackTrace() will be called on
them again when they are actually thrown. This patch adds a flag so we
can disable the stack trace fill out during startup.
This serves two purposes:
1. Makes bootstrapping the runtime a little more efficient, by
eliminating a few system calls and allocations.
2. Prevents one potential problem in the out of memory sitation, where
printStackTrace() would try to allocate when dumping the stack of the
OutOfMemoryException (which wouldn't be the correct stack anyway).
[ bryce ]
More information about the Java-patches