Patent №
US 6,185,597
Granted
2001-02-06
Filed 1997
Owner
—
Lab
—
AI components
1
hardware
Assignment
None on record
Dataset
AIPD
2023_r1 edition
Application
08967293
A method and system for growing stack frames is described. According to the invention, actual growth of a stack frame buried below the top of the stack is delayed until such time as the frame is returned to the top of the stack. The invention can be applied, for example, in a source code debugger to provide an improved Edit and Continue capability. In one aspect, the invention is implemented in a computer system that includes a processor (CPU), a stack of frames accessible to the processor, and a program for execution by the processor. The program is composed of a set of procedures. The processor begins executing a procedure of the set and places a stack frame associated with the execution of the procedure on top of the stack. This first stack frame includes a reserved location that can be used later to record an amount or increment by which to grow the frame. The processor begins executing another procedure (or another instance of the same procedure) and places a second stack frame associated with this second procedure execution at the top of the stack above the first frame. The processor receives a command to increase the size of the first frame by a specified increment. While the second frame is above the first frame in the stack, the processor saves the specified increment in the reserved frame location of the buried first stack frame. Thereafter, the processor brings the first frame back to the top of the stack, retrieves the saved increment from the reserved frame location of the first frame, and increases the size of the first frame by the specified increment. The processor then can continue the first procedure execution with the first frame thus increased in size.