Method and apparatus for developing an application that...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000, C717S152000, C717S152000, C717S152000

Reexamination Certificate

active

06275985

ABSTRACT:

BACKGROUND
1. Field of the Invention
The present invention relates to compilers and garbage collection in computer systems. More specifically, the present invention relates to a method and apparatus for developing an application using a first compiler and then compiling the application with a second compiler that provides support for efficient garbage collection.
2. Related Art
Programming languages with automatic memory management, such as the JAVA™ programming language from Sun Microsystems, Inc. of Palo Alto, Calif., are widely recognized for making software development easier. Unlike conventional programming languages, such as C or C++, that require programmers to use pointers and explicit memory allocation operations to manage dynamic data structures, languages such as the Java programming language take care of memory management automatically.
Automatic memory management systems typically allocate data objects from memory as they are needed during execution of a program. When memory objects are no longer being used by the program, they are typically reclaimed through a process known as “garbage collection.”
Programming languages with automatic memory management relieve the programmer of the responsibility of explicitly managing memory, and this generally leads to better programming style. However, programming languages with automatic memory management also provide less control over memory allocation and pointer manipulation during program execution. This makes the behavior of the program harder to understand and predict. Furthermore, while languages with automatic memory management often provide reasonable performance in typical application programming tasks, in certain “systems programming” tasks involving time-critical system functions, the reduced control over memory management can cause performance problems. Programmers typically do not use programming languages with automatic memory management for systems programming tasks, but instead write systems programs using other, less elegant programming languages such as C or C++, which require explicit commands to allocate and deallocate memory.
One of the main performance problems for programs written in programming languages with automatic memory management is the garbage collection process. Garbage collection typically involves chasing down pointers in active data structures to determine which data objects are presently being referenced, so that the other data objects, which are no longer being referenced, can be reclaimed.
One problem in performing garbage collection is to identify objects in memory that are referenced by pointers on the system stack. One solution to this problem is to use proxy objects. Proxy objects are special system objects that point to data objects in memory. In order to use proxy objects, pointers on the system stack are modified so that they point to the proxy objects, which contain pointers to corresponding data objects in memory. This allows the garbage collection process to simply reference the proxy objects to determine which objects in memory are referenced by pointers in the stack. However, using proxy objects can be time-consuming and inefficient because a program that uses proxy objects must explicitly allocate and deallocate proxy objects, and must manipulate the proxy objects during references from the system stack.
Another solution to the problem of identifying objects referenced by the system stack is to modify a compiler so that it produces a “stack map” for each stack frame. A stack map identifies which items within a given stack frame contain pointers to objects in memory. This allows a garbage collection process to follow down the identified pointers in the system stack.
Unfortunately, many applications that implement garbage collections (such as virtual machines) have been developed using proxy objects, and these applications must be rewritten to take advantage of the performance advantages of stack maps. What is needed is a method and an apparatus that allows applications developed using proxy objects and a standard compiler to take advantage of the performance benefits of using compiler support to identify pointers within a system stack.
SUMMARY
One embodiment of the present invention provides a system that facilitates developing an application that implements garbage collection (such as a virtual machine) using a first compiler and then compiling the application with a second compiler that provides support for efficient garbage collection. The system operates by developing the application using a first compiler and proxy objects, so that during execution of the application, pointers within the system stack point indirectly to data objects through proxy objects. These proxy objects are used during the garbage collection process to identify data objects that are referenced by the pointers within the system stack. Next, the system provides a second compiler that produces stack maps that identify pointers in the system stack. This allows the garbage collection process to identify objects referenced by the pointers in the system stack without using proxy objects. The application is then compiled using the second compiler, so pointers in the system stack point directly to objects instead of pointing to the objects indirectly through proxy objects. This allows the application to run faster because it eliminates the extra indirection operations caused by proxy objects. Thus, the above-described system allows programmers to develop an application using proxy objects, while concurrently developing a second compiler that provides stack maps to support garbage collection. When the second compiler is completed the application can be compiled with the second compiler.
According to one aspect of the present invention, the application includes a virtual machine for executing platform-independent programs. According to another aspect of the present invention, the application manipulates proxy objects through a set of methods, including methods to allocate, free, set and retrieve a value from proxy objects. These methods are compiled by the first compiler into executable code that manipulates proxy objects, and are compiled by the second compiler into executable code that does not manipulate proxy objects, but instead uses stack maps and pointers within the stack to simulate the proxy objects.


REFERENCES:
patent: 5274804 (1993-12-01), Jackson et al.
patent: 5903900 (1999-05-01), Knippel et al.
patent: 5909579 (1999-06-01), Agesen et al.
patent: 5960087 (1999-09-01), Tribble et al.
patent: 6138238 (1999-09-01), Scheifler
“Java Virtual MAchine”, J. Meyer et al. O'Reilly Press, pp. 114-128, Mar. 1997.*
“The Java Virtual MAchine Specification”, T. Lindholm et al. Java Press, Chapters 3 and 7, Sep. 1996.*
“Java!”, by T. Richey Chapters 1-14, Sep. 1995.*
ACM Sigplan Workshop on Intermediate Representations (IR '95) by James Gosling, 1995.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and apparatus for developing an application that... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and apparatus for developing an application that..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and apparatus for developing an application that... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2545035

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.