Method, apparatus, system and computer program product for initializing a data structure at its first active use
First Claim
1. A computer controlled method for invoking a programmed operation on a data structure responsive to a first active use of said data structure, said method comprising the steps of:
- (b) causing a condition for a misaligned memory access fault;
(c) associating a data structure access tag storage with said data structure, said data structure access tag storage initially containing a misaligned memory address related to said data structure;
(d) requiring a memory access operation to be performed using a memory access mode which requires a memory address in a first address sense, and attempting memory access at a memory address in a second memory sense;
(e) triggering a trap on said first active use of said data structure by attempting to access said data structure using said misaligned memory address with an aligned memory access-mode; and
(f) converting said misaligned memory address within said data structure access tag storage from the first memory sense to the second memory sense to an aligned memory address whereby subsequent attempts to access said data structure using said aligned memory access-mode and contents of said data structure access tag storage will succeed without triggering said trap as a result of the memory address being in the second memory sense.
1 Assignment
0 Petitions
Accused Products
Abstract
Apparatus, methods, systems and computer program products are disclosed that provide an efficient mechanism for invoking a programmed operation at the first active use of the OOP object or data structure. The programmed operation can be used to initialize an object-oriented programming (OOP) object or data structure. The first active use of the data structure or OOP object is detected because the initial access mechanism is constrained to cause a misaligned memory access fault (trap) by attempting a non-byte access-mode memory access to an odd byte address. As the fault is processed, the access mechanism is converted so that the initial and subsequent non-byte access-mode memory accesses will succeed. In addition, the OOP object or data structure is initialized. Then the initial access attempt is repeated on the just initialized OOP object or data structure using the converted access mechanism. The use of the invention improves the performance of computers by reducing the overhead involved with particular computational operations.
-
Citations
32 Claims
-
1. A computer controlled method for invoking a programmed operation on a data structure responsive to a first active use of said data structure, said method comprising the steps of:
-
(b) causing a condition for a misaligned memory access fault; (c) associating a data structure access tag storage with said data structure, said data structure access tag storage initially containing a misaligned memory address related to said data structure; (d) requiring a memory access operation to be performed using a memory access mode which requires a memory address in a first address sense, and attempting memory access at a memory address in a second memory sense; (e) triggering a trap on said first active use of said data structure by attempting to access said data structure using said misaligned memory address with an aligned memory access-mode; and (f) converting said misaligned memory address within said data structure access tag storage from the first memory sense to the second memory sense to an aligned memory address whereby subsequent attempts to access said data structure using said aligned memory access-mode and contents of said data structure access tag storage will succeed without triggering said trap as a result of the memory address being in the second memory sense. - View Dependent Claims (2, 3, 4)
-
-
5. A computer controlled method for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, said method comprising the steps of:
-
(a) aligning said data structure element on an even memory address, said data structure element located at an even offset within said data structure such that said data structure element can be accessed using a non-byte access-mode; (b) associating a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure;
(c) triggering a trap on said initial access of said data structure by attempting to access said data structure element using said non-byte access-mode with said odd data structure memory address and said even offset;(d) converting said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; (e) invoking said programmed operation; and (f) accessing said data structure element using said even data structure address, wherein said data structure is related to an object-oriented programming object, and said object-oriented programming object is a Java class object initialized at said Java class object'"'"'s first active use.
-
-
6. A computer controlled system, having a central processing unit (CPU) and a memory coupled to said CPU, for invoking a programmed operation on a data structure responsive to a first active use of said data structure, said system comprises:
-
an association mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing a misaligned memory access related to said data structure, the misaligned memory access establishing a condition for a misaligned memory access fault; a misaligned memory access error mechanism configured to trigger a trap on said first active use of said data structure by attempting to access said data structure using an aligned memory access-mode with said misaligned memory address associated with said data structure by the association mechanism, the misaligned memory access error mechanism requiring a memory access operation to be performed using a memory access mode which requires a memory address in a first address sense, and attempting memory access at a memory address in a second memory sense; and an address conversion mechanism configured to convert said misaligned memory address within said data structure access tag storage to an aligned memory address responsive to the misaligned memory access error mechanism whereby subsequent attempts to access said data structure using said aligned memory access-mode and contents of said data structure access tag storage will succeed without triggering said trap. - View Dependent Claims (7, 8, 9)
-
-
10. A computer controlled system, having a central processing unit (CPU) and a memory coupled to said CPU, for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, wherein said system comprises:
-
an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; a trigger mechanism configured to trigger a trap on said initial access of said data structure element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; an invocation mechanism configured to invoke said programmed operation; and a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said data structure is related to an object-oriented programming object, and said object-oriented programming object is a Java class object initialized at said Java class object'"'"'s first active use.
-
-
11. An apparatus having a central processing unit (CPU) and a memory coupled to said CPU for invoking a programmed operation on a data structure responsive to a first active use of said data structure, said apparatus comprises:
-
an association mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing a misaligned memory address related to said data structure, the misaligned memory access establishing a condition for a misaligned memory access fault; a misaligned memory access error mechanism configured to trigger a trap on said first active use of said data structure by attempting to access said data structure using an aligned memory access-mode with said misaligned memory address associated with said data structure by the association mechanism, the misaligned memory access error mechanism requiring a memory access operation to be performed using a memory access mode which requires a memory address in a first address sense, and attempting memory access at a memory address in a second memory sense; and an address conversion mechanism configured to convert said misaligned memory address within said data structure access tag storage to an aligned memory address responsive to the misaligned memory access error mechanism whereby subsequent attempts to access said data structure using said aligned memory access-mode and contents of said data structure access tag storage will succeed without triggering said trap. - View Dependent Claims (13, 14)
-
-
12. The apparatus of claim further comprising:
an alignment mechanism configured to align said data structure at said aligned memory address such that said data structure can be accessed using said aligned memory access-mode and contents of said data structure access tag storage.
-
15. An apparatus having a central processing unit (CPU) and a memory coupled to said CPU for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, wherein said apparatus comprises:
-
an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; a trigger mechanism configured to trigger a trap on said initial access of said data structure element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; an invocation mechanism configured to invoke said programmed operation; and a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said data structure is related to an object-oriented programming object, and said object-oriented programming object is a Java class object initialized at said Java class object'"'"'s first active use.
-
-
16. A computer program product comprising:
-
a computer usable storage medium having computer readable code embodied therein for invoking a programmed operation on a data structure responsive to a first active use of said data structure, said computer readable code comprising; computer readable code configured to cause a condition for a misaligned memory access fault; computer readable code configured to cause said computer to effect an association mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing a misaligned memory address related to said data structure; computer readable code configured to require a memory access operation to be performed using a memory access mode which requires a memory address in a first address sense, and attempting memory access at a memory address in a second memory sense; computer readable code configured to cause said computer to effect a misaligned memory access error mechanism configured to trigger a trap on said first active use of said data structure by attempting to access said data structure using an aligned memory access-mode with said misaligned memory address associated with said data structure by the association mechanism; and computer readable code configured to cause said computer to effect an address conversion mechanism configured to convert said misaligned memory address within said data structure access tag storage from the first memory sense to an aligned memory address responsive to the misaligned memory access error mechanism whereby subsequent attempts to access said data structure using said aligned memory access-mode and contents of said data structure access tag storage will succeed without triggering said trap as a result of the memory address being in the second memory sense. - View Dependent Claims (17, 18, 19)
-
-
20. A computer program product comprising:
-
a computer usable storage medium having computer readable code embodied therein for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, said computer readable code comprising; establishing a condition for a misaligned memory access fault; computer readable code configured to cause said computer to effect an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; computer readable code configured to cause said computer to effect an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; requiring a memory access operation to be performed using a memory access mode which requires a memory address in a first address sense, and attempting memory access at a memory address in a second memory sense; computer readable code configured to cause said computer to effect a trigger mechanism configured to trigger a trap on said initial access of said data structure element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; computer readable code configured to cause said computer to effect an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; computer readable code configured to cause said computer to effect an invocation mechanism configured to invoke said programmed operation; and computer readable code configured to cause said computer to effect a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said data structure is related to an object-oriented programming object, and said object-oriented programming object is a Java class object initialized at said Java class object'"'"'s first active use.
-
-
21. A computer controlled method for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, said method comprising the steps of:
-
(a) aligning said data structure element on an even memory address, said data structure element located at an even offset within said data structure such that said data structure element can be accessed using a non-byte access-mode; (b) associating a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; (c) triggering a trap on said initial access of said data structure by attempting to access said data structure element using said non-byte access-mode with said odd data structure memory address and said even offset; (d) converting said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; (e) invoking said programmed operation; and (f) accessing said data structure element using said even data structure address, wherein said programmed operation is an initializing procedure that initializes said data structure element in said data structure at said data structure'"'"'s first active use.
-
-
22. A computer controlled method for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, said method comprising the steps of:
-
(a) aligning said data structure element on an even memory address, said data structure element located at an even offset within said data structure such that said data structure element can be accessed using a non-byte access-mode; (b) associating a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; (c) triggering a trap on said initial access of said data structure by attempting to access said data structure element using said non-byte access-mode with said odd data structure memory address and said even offset; (d) converting said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; (e) invoking said programmed operation; and (f) accessing said data structure element using said even data structure address, wherein said data structure element is a static class variable in a Java class object and said programmed operation is an initializing procedure that initializes said static class variable by invoking a class initializer on said Java class object.
-
-
23. A computer controlled system, having a central processing unit (CPU) and a memory coupled to said CPU, for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, wherein said system comprises:
-
an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; a trigger mechanism configured to trigger a trap on said initial access of said data structure, element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; an invocation mechanism configured to invoke said programmed operation; and a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said programmed operation is an initializing procedure that initializes said data structure element within said data structure at said data structure'"'"'s first active use.
-
-
24. A computer controlled system, having a central processing unit (CPU) and a memory coupled to said CPU, for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, wherein said system comprises:
-
an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; a trigger mechanism configured to trigger a trap on said initial access of said data structure element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; an invocation mechanism configured to invoke said programmed operation; and a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said data structure element is static class variable in a Java class object and said programmed operation is an initializing procedure that further comprises a class initializer mechanism configured to initialize said static class variable within said Java class object.
-
-
25. An apparatus having a central processing unit (CPU) and a memory coupled to said CPU for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, wherein said apparatus comprises:
-
an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; a trigger mechanism configured to trigger a trap on said initial access of said data structure element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; an invocation mechanism configured to invoke said programmed operation; and a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said programmed operation is an initializing procedure that initializes said data structure element within said data structure at said data structure'"'"'s first active use.
-
-
26. An apparatus having a central processing unit (CPU) and a memory coupled to said CPU for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, wherein said apparatus comprises:
-
an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; a trigger mechanism configured to trigger a trap on said initial access of said data structure element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; an invocation mechanism configured to invoke said programmed operation; and a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said data structure element is a static class variable in a Java class object and said programmed operation is an initializing procedure that further comprises a class initializer mechanism configured to initialize said static class variable within said Java class object.
-
-
27. A computer program product comprising:
-
a computer usable storage medium having computer readable code embodied therein for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, said computer readable code comprising; computer readable code configured to cause said computer to effect an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; computer readable code configured to cause said computer to effect an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; computer readable code configured to cause said computer to effect a trigger mechanism configured to trigger a trap on said initial access of said data structure element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; computer readable code configured to cause said computer to effect an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; computer readable code configured to cause said computer to effect an invocation mechanism configured to invoke said programmed operation; and computer readable code configured to cause said computer to effect a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said programmed operation is an initializing procedure that initializes said data structure element within said data structure at said data structure'"'"'s first active use.
-
-
28. A computer program product comprising:
a computer usable storage medium having computer readable code embodied therein for invoking a programmed operation in response to an initial access of a data structure element contained within a data structure, said computer readable code comprising; computer readable code configured to cause said computer to effect an alignment mechanism configured to align said data structure element on an even memory address of said memory, said data structure element located at an even offset within said data structure such that said data structure element can be accessed from said memory using a non-byte access-mode of said CPU; computer readable code configured to cause said computer to effect an access tag mechanism configured to associate a data structure access tag storage with said data structure, said data structure access tag storage initially containing an odd data structure memory address related to said data structure; computer readable code configured to cause said computer to effect a trigger mechanism configured to trigger a trap on said initial access of said data structure element by attempting to access said data structure element in said memory using said non-byte access-mode with said odd data structure memory address and said even offset; computer readable code configured to cause said computer to effect an address conversion mechanism, responsive to the trigger mechanism, configured to convert said odd data structure memory address within said data structure access tag storage to an even data structure address whereby subsequent attempts to access said data structure element using said non-byte access-mode with said even data structure address and said even offset will succeed without triggering said trap; computer readable code configured to cause said computer to effect an invocation mechanism configured to invoke said programmed operation; and computer readable code configured to cause said computer to effect a data access mechanism configured to access said data structure element within said memory using said even data structure address, wherein said data structure element is a static class variable in a Java class object and said programmed operation is an initializing procedure that further comprises computer readable code configured to cause said computer to effect a class initializer mechanism configured to initialize said static class variable within said Java class object.
-
29. A computer controlled method for invoking a programmed operation on a data structure responsive to a first active use of said data structure, said method comprising:
-
causing a misaligned memory access fault; associating a data structure access tag storage with said data structure, said data structure access tag storage initially containing said misaligned memory address related to said data structure; requiring a memory access operation to be performed using a memory access mode which requires a memory address in a first address sense, and attempting memory access at a memory address in a second memory sense; triggering a trap on said first active use of said data structure by attempting to access said data structure using said misaligned memory address with an aligned memory access-mode; and converting said misaligned memory address within said data structure access tag storage from the first memory sense to the second memory sense to an aligned memory address whereby subsequent attempts to access said data structure using said aligned memory access-mode and contents of said data structure access tag storage will succeed without triggering said trap as a result of the memory address being in the second memory sense. - View Dependent Claims (30, 31, 32)
-
Specification