Search Images Maps Play YouTube News Gmail Drive More »
Advanced Patent Search | Web History | Sign in

Patents

A method and apparatus for pre-processing and packaging class files. Embodiments remove duplicate information elements from a set of class files to reduce the size of individual class files and to prevent redundant resolution of the information elements. Memory allocation requirements are determined in advance for the set of classes as a whole to reduce the complexity of memory allocation when the set of classes are loaded. The class files are stored in a single package for efficient storage, transfer and processing as a unit. In an embodiment, a pre-processor examines each class file in a set of class files to locate duplicate information in the form of redundant constants contained in a constant pool. The duplicate constant is placed in a separate shared table, and all occurrences of the constant are removed from the respective constant pools of the individual class files. During pre-processing, memory allocation requirements are determined for each class file, and used to...

InventorsNedim Fresko, Richard Tuck
Original AssigneeSun Microsystems, Inc.
Primary Examiner: Tuan Q. Dam
Secondary Examiner: Edmond L Rodriguez
Attorney: Martine & Penilla, LLP
Current U.S. Classification717/166; 717/143
International Classification: G06F/944

View patent at USPTO
Search USPTO Assignment Database

Citations

Cited PatentFiling dateIssue dateOriginal AssigneeTitle
US5303149Oct 28, 1991Apr 12, 1994System for eliminating duplicate entries from a mailing list
US5367675Dec 13, 1991Nov 22, 1994International Business Machines CorporationComputer automated system and method for optimizing the processing of a query in a relational database system by merging subqueries with the query
US5488725Mar 30, 1993Jan 30, 1996West Publishing CompanySystem of document representation retrieval by successive iterated probability sampling
US5548758Jun 5, 1995Aug 20, 1996International Business Machines CorporationOptimization of SQL queries using early-out join transformations of column-bound relational tables
US5717915Mar 4, 1996Feb 10, 1998Method of merging large databases in parallel
US5732265Nov 2, 1995Mar 24, 1998Microsoft CorporationStorage optimizing encoder and method
US5813009Jul 28, 1995Sep 22, 1998UniVirtual Corp.Computer based records management system method
US5815718May 30, 1996Sep 29, 1998Sun Microsystems, Inc.Method and system for loading classes in read-only memory
US5826265Dec 6, 1996Oct 20, 1998International Business Machines CorporationData management system having shared libraries
US5829006Jun 6, 1995Oct 27, 1998International Business Machines CorporationSystem and method for efficient relational query generation and tuple-to-object translation in an object-relational gateway supporting class inheritance
US5838965Nov 10, 1994Nov 17, 1998CADIS, Inc.Object oriented database management system
US6026237Nov 3, 1997Feb 15, 2000International Business Machines CorporationSystem and method for dynamic modification of class files
US6047318Nov 19, 1997Apr 4, 2000International Business Machines CorporationMethod of downloading java bean files in a network
US6260187Aug 20, 1998Jul 10, 2001Wily Technology, Inc.System for modifying object oriented code
US6272674Dec 14, 1998Aug 7, 2001Nortel Networks LimitedMethod and apparatus for loading a Java application program
US6286051Nov 12, 1997Sep 4, 2001International Business Machines CorporationMethod and apparatus for extending a java archive file
US6336122Oct 15, 1998Jan 1, 2002International Business Machines CorporationObject oriented class archive file maker and method
US6339841Apr 16, 1999Jan 15, 2002International Business Machines CorporationClass loading model
US6349344Dec 16, 1997Feb 19, 2002Microsoft CorporationCombining multiple java class files into a run-time image
US6446084Sep 22, 1998Sep 3, 2002Sun Microsystems, Inc.Optimizing symbol table lookups in platform-independent virtual machines

Referenced by

Citing PatentFiling dateIssue dateOriginal AssigneeTitle
US6658492Mar 20, 1998Dec 2, 2003Sun Microsystems, Inc.System and method for reducing the footprint of preloaded classes
US6745386Mar 9, 2000Jun 1, 2004Sun Microsystems, Inc.System and method for preloading classes in a data processing device that does not have a virtual memory manager
US6938241Dec 10, 2001Aug 30, 2005LSI Logic CorporationCompiler independent bit-field macros
US6976061May 24, 2000Dec 13, 2005Sun Microsystems, Inc.Resource adapter and XML descriptor for use in a client server environment utilizing an enterprise information system
US6986129Aug 14, 2001Jan 10, 2006Sun Microsystems, Inc.System and method for java preprocessor
US7036120Jul 31, 2001Apr 25, 2006Sun Microsystems, Inc.Two tier clusters for representation of objects in Java programming environments
US7073171Feb 26, 2004Jul 4, 2006BEA Systems, Inc.EJB implementation class loading with removed dependencies with ability to replace EJB implementation class without full redeployment
US7082597Jun 20, 2001Jul 25, 2006Sun Microsystems, Inc.Representation of objects in a Java programming environment
US7107537Jan 16, 2001Sep 12, 2006Hewlett-Packard Development Company, L.P.Apparatus and method for updating applications to embedded devices and peripherals within a network environment
US7152055Nov 30, 2000Dec 19, 2006Sun Microsystems, Inc.Method and system for reducing document file size by deleting unused and duplicate template data
US7188339Oct 24, 2003Mar 6, 2007Hewlett-Packard Development Company, L.P.ACPI preprocessor
US7240341Feb 7, 2001Jul 3, 2007Esmertec AGGlobal constant pool to allow deletion of constant pool entries
US7283991Mar 11, 1999Oct 16, 2007Microsoft CorporationCaching system for path search optimization
US7412700May 18, 2004Aug 12, 2008Oracle International CorporationProduct packaging and installation mechanism
US7444629Nov 12, 2004Oct 28, 2008International Business Machines CorporationAutonomic self-healing of java resources
US7581216Jan 21, 2005Aug 25, 2009International Business Machines CorporationPreserving platform independence with native accelerators for performance critical program objects
US7761862Mar 10, 2006Jul 20, 2010International Business Machines CorporationExternalized classloader information for application servers
US7849459Nov 4, 2004Dec 7, 2010International Business Machines CorporationDeploying java applications in resource constrained environments
US8205193Jun 11, 2001Jun 19, 2012Hewlett-Packard Development Company, L.P.Runtime updating of virtual machine class files

Claims

1. A method for processing classes comprising:

obtaining duplicative information comprising one or more duplicated elements from one or more classes;
obtaining one or more reduced classes by removing said one or more duplicated elements from said one or more classes;
obtaining a multi-class file comprising said duplicative information and said reduced classes; and
allocating a dynamic memory to receive said multi-class file, said multi-class file to be completely received into said dynamic memory.

2. The method of claim 1 wherein said multi-class file further comprises memory allocation information.

3. The method of claim 2 wherein said memory allocation information comprises a memory requirement for each of said one or more reduced classes.

4. The method of claim 3 wherein said memory allocation information comprises a total memory allocation requirement for loading said one or more reduced classes and said duplicative information.

5. The method of claim 4, further comprising:

reading said total memory allocation requirement from said multi-class file, said allocating said dynamic memory to receive said multi-class file being based on said total memory allocation requirement; and
loading said one or more reduced classes and said duplicative information into said dynamic memory.

6. The method of claim 1 wherein said duplicative information comprises a set of file constants.

7. The method of claim 6, wherein said step of obtaining duplicative information comprises obtaining one or more of said file constants shared between two or more of said classes.

8. The method of claim 1 further comprising obtaining a shared table comprising said duplicative information.

9. The method of claim 1 wherein said duplicative information is information regarding a file format of said one or more classes.

10. The method of claim 1 further comprising loading classes by loading said multi-class file.

11. A computer program product comprising:

a computer usable medium having computer readable program code embodied therein for processing classes, said computer program product comprising:
computer readable program code configured to cause a computer to obtain duplicative information comprising one or more duplicated elements from one or more classes;
computer readable program code configured to cause a computer to obtain one or more reduced classes by removing said one or more duplicated elements from said one or more classes;
computer readable program code configured to cause a computer to obtain a multi-class file comprising said duplicative information and said reduced classes; and
computer readable program code configured to cause a computer to allocate a dynamic memory to receive said multi-class file, said multi-class file to be completely received into said dynamic memory.

12. The computer program product of claim 11 wherein said multi-class file further comprises memory allocation information.

13. The computer program product of claim 12 wherein said memory allocation information comprises a memory requirement for each of said one or more reduced classes.

14. The computer program product of claim 12 wherein said memory allocation information comprises a total memory allocation requirement for loading said one or more reduced classes and said duplicative information.

15. The computer program product of claim 14 further comprising:

computer readable program code configured to cause a computer to read said total memory allocation requirement from said multi-class file, said computer readable program code configured to cause a computer to allocate said dynamic memory to receive said multi-class file being based on said total memory allocation requirement; and
computer readable program code configured to cause a computer to load said one or more reduced classes and said duplicative information into said dynamic memory.

16. The computer program product of claim 11 wherein said duplicative information comprises a set of file constants.

17. The computer program product of claim 16 wherein said computer readable program code configured to obtain duplicative information comprises computer readable program code configured to cause a computer to obtain one or more of said file constants shared between two or more of said classes.

18. The computer program product of claim 11 further comprising computer readable program code configured to cause a computer to obtain a shared table comprising said duplicative information.

19. The computer program product of claim 11 wherein said duplicative information is information regarding a file format of said one or more classes.

20. The computer program product of claim 11 further comprising computer readable program code configured to cause a computer to load classes by loading said multi-class file.

21. A system comprising:

a processor;
a memory coupled to said processor;
one or more classes stored in said memory;
duplicative information that is duplicated across one or more of said classes;
a process executing on said processor, said process configured to obtain one or more reduced classes by removing said duplicative information from said one or more classes;
a multi-lass file comprised of said duplicative information and said one or more reduced classes, said multi-class file obtained by a process executing on said processor; and
a process executing on said processor, said process configured to load said multi-class file completely into a dynamic memory.

22. The system of claim 21 wherein said multi-class file further comprises memory allocation information.

23. The system of claim 22 wherein said memory allocation information comprises a memory requirement for said one or more reduced classes.

24. The system of claim 22 wherein said memory allocation information comprises a total memory allocation requirement for said processor to execute said process configured to load said multi-class file into said dynamic memory.

25. The system of claim 24 further comprising:

said processor configured to execute a process for reading said total memory allocation requirement from said multi-class file; and
said processor configured to execute a process for allocating a portion of said dynamic memory based on said total memory allocation requirement.

26. The system of claim 21 wherein said duplicative information comprises a set of file constants.

27. The system of claim 26 wherein one or more of said file constants are shared between two or more of said classes.

28. The system of claim 21 further comprising a shared table comprising said duplicative information.

29. The system of claim 21 wherein said duplicative information comprises information regarding a file format of said one or more classes.

30. A method of pre-processing class files comprising:

determining one or more duplicated elements in a plurality of class files;
forming a shared table associated with said plurality of class files, said shared table comprising said one or more duplicated elements;
removing said one or more duplicated elements from said plurality of class files;
forming a multi-class file comprising said plurality of class files and said shared table; and
allocating a dynamic memory to receive said multi-class file, said multi-class file to be completely received into said dynamic memory.

31. The method of claim 30, further comprising:

computing an individual memory allocation requirement for each of said plurality of class files;
computing a total memory allocation requirement for said plurality of class files from said individual memory allocation requirement for each of said plurality of class files; and
storing said total memory allocation requirement in said multi-class file.

32. The method of claim 31, further comprising:

reading said total memory allocation requirement from said multi-class file, said allocating said dynamic memory to receive said multi-class file being based on said total memory allocation requirement; and
loading said plurality of class files and said shared table into said dynamic memory.

33. The method of claim 30, further comprising:

accessing said shared table to obtain one or more elements not found in one or more of said plurality of class files.

34. The method of claim 30, wherein said step of determining one or more duplicated elements comprises:

determining one or more constants shared between two or more class files.

35. The method of claim 34, wherein said step of forming a shared table comprises:

forming a shared constant table comprising said one or more constants shared between said two or more class files.

36. A computer program product comprising:

a computer usable medium having computer readable program code embodied therein for pre-processing class files, said computer program product comprising:
computer readable program code configured to cause a computer to determine one or more duplicated elements in a plurality of class files;
computer readable program code configured to cause a computer to form a shared table associated with said plurality of class files, said shared table comprising said plurality of duplicated elements;
computer readable program code configured to cause a computer to remove said one or more duplicated elements from said plurality of class files;
computer readable program code configured to cause a computer to form a multi-class file comprising said plurality of class files and said shared table; and
computer readable program code configured to cause a computer to allocate a dynamic memory to receive said multi-class file, said multi-class file to be completely received into said dynamic memory.

37. The computer program product of claim 36, further comprising:

computer readable program code configured to cause a computer to compute an individual memory allocation requirement for each of said plurality of class files;
computer readable program code configured to cause a computer to compute a total memory allocation requirement for said plurality of class files from said individual memory allocation requirement for each of said plurality of class files; and
computer readable program code configured to cause a computer to store said total memory allocation requirement in said multi-class file.

38. The computer program product of claim 37, further comprising:

computer readable program code configured to cause a computer to read said total memory allocation requirement from said multi-class file, said allocating said dynamic memory to receive said multi-class file being based on said total memory allocation requirement; and
computer readable program code configured to cause a computer to load said plurality of class files and said shared table into said dynamic memory.

39. The computer program product of claim 36, further comprising:

computer readable program code configured to cause a computer to access said shared table to obtain one or more elements not found in one or more of said plurality of class files.

40. The computer program product of claim 36, wherein said computer readable program code configured to cause a computer to determine said one or more duplicated elements comprises:

computer readable program code configured to cause a computer to determine one or more constants shared between two or more class files.

41. The computer program product of claim 40, wherein said computer readable program code configured to cause a computer to form said shared table comprises:

computer readable program code configured to cause a computer to form a shared constant table comprising said one or more constants shared between said two or more class files.

42. A dynamic memory configured to store data for access by a computer system for processing class files, comprising:

a data structure stored completely in said dynamic memory, said data structure comprising:
a plurality of class files; and
a shared table comprising one or more elements that are duplicated between two or more of said plurality of class files, said shared table configured to be accessed for said duplicated elements, wherein said duplicated elements are further removed from said plurality of class files.

43. The dynamic memory of claim 42, wherein said duplicated elements comprise constants and said shared table comprises a shared constant pool.

44. The dynamic memory of claim 42, further comprising a memory requirement value configured to be read by the computer system to allocate a runtime data area in a dynamic memory for loading said plurality of class files and said shared table.

45. The dynamic memory of claim 44, wherein said memory requirement value is computed from individual memory requirements of said plurality of class files and a memory requirement of said shared table.