发明名称 Method and apparatus for finding resource allocation errors in virtual machine compilers
摘要 A method and apparatus for resource allocation tracking by virtual machine compilers are described. The method may be used to track the allocation of any limited computer resource needed by a program. One embodiment tracks the allocation of temporary registers by a virtual machine compiler. This tracking mode allows easy testing of the compiler for resource allocation errors. In the referenced embodiment, for each possible temporary register usage in a stream of execution, the invention provides a method for a virtual machine compiler to provide an allocation indicator to track the use of temporary registers. When tracking mode is enabled, before allocating a resource (temporary register) for use in the current scope, the compiler checks the allocation indicator of the corresponding temporary register. If the desired register is already allocated (its corresponding bit of the allocation indicator is set,) the invention halts the operation and informs the user of a temporary register allocation error. If the temporary register is not allocated, the compiler sets the bit of the allocation indicator to reserve the register, and proceeds to allocate the register. When the code section using the temporary register has completed the compiler turns off the bit corresponding to the temporary register that has just been freed.
申请公布号 US2004015874(A1) 申请公布日期 2004.01.22
申请号 US20010855433 申请日期 2001.05.14
申请人 UNGAR DAVID 发明人 UNGAR DAVID
分类号 G06F11/36;(IPC1-7):G06F9/44 主分类号 G06F11/36
代理机构 代理人
主权项
地址