发明名称 Method and apparatus for avoiding array class creation in virtual machines
摘要 Embodiments of the invention comprise a method and apparatus for avoiding array class creation in, for example, virtual machines for object-oriented programming languages. Embodiments of the invention reduce the internal structures created for arrays at runtime, thereby reducing memory consumption. Unlike in a traditional implementation, where a separate array class is created for each array of different type, in an embodiment of the invention the type information is stored in array instances instead. Array classes are not created at all. Rather, the root class of the class hierarchy (e.g., "java.lang.Object") is used as the class of each array instance. When an array instance is instantiated, a reference to the "java.lang.Object" class is created in the class field of the array instance and the type information is stored in the instance itself. In one embodiment of the invention, an integer type value is stored in a special type field of the array instance. The type field can be part of an existing field or a new field of the array instance. In an alternate embodiment of the invention, a type field is included in an array instance that can contain a reference, or pointer, to the element type class for the array.
申请公布号 US6557023(B1) 申请公布日期 2003.04.29
申请号 US19990322210 申请日期 1999.05.28
申请人 SUN MICROSYSTEMS, INC. 发明人 TAIVALSAARI ANTERO
分类号 G06F9/44;G06F9/445;(IPC1-7):G06F9/44 主分类号 G06F9/44
代理机构 代理人
主权项
地址