At 09:09 AM 3/30/2002 -0500, Dan Sugalski wrote:
>At 1:03 AM -0500 3/30/02, Melvin Smith wrote:
>>Frame stacks now keep their size, no use in freeing the chunks; if we
>>reached a frame depth N once, we will typically reach N many more times.
>
>If someone's feeling ambitious, code to check the number of unused chunks 
>may be in order--that way if we have more than N unused chunks we can free 
>the excess. (For those cases where the stack gets massively, but rarely, blown)

I almost did this but decided to call it a night.

I was thinking along the lines of a resource limit similar to the JVM
where we can pass in optimal and maximum stack sizes. We'd
just need a chunk counter in the chunk member and multiply it
times the frames per chunk. For a tuning configurable it would
be nice to modify FRAMES_PER_CHUNK at compile time.

Max stack size is a good check against spiralling death syndrome
because I can say, "Ok for this particular production app, there should
never be a possibility of a depth of 1000 frames so if we ever get
there dump a bytecode image before we get to 2000, 3000, 10000
and end up thrashing the system or dumping a 1Gb core the hard way."

-Melvin

Reply via email to