Object-Oriented Storage Item Size Reduction via Numeric Range Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Object-oriented programs face significant memory usage challenges due to the allocation of storage items for objects and temporary variables, which is exacerbated by the creation of numerous objects and the need for efficient memory management in virtual machines.
Innovation Solution
A method that analyzes class definitions to identify numeric ranges for storage items, allowing for the reduction of their size while still supporting the required ranges, thereby reducing memory usage by modifying the class definition and allocating smaller sizes to storage items such as fields and temporary variables.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the original size is allocated to each storage item to ensure full numeric range support, then reliability is maintained, but memory usage increases
Solution Approach 1:
The patent changes the parameter of storage item size from fixed original size to dynamically optimized size. By analyzing the actual numeric range required by each storage item and adjusting the size parameter accordingly, the system maintains sufficient numeric range support while reducing memory allocation. This is achieved through runtime analysis of class definitions and speculative size reduction with validation mechanisms.
2Quantity of substance
If memory size is reduced for storage items, then memory usage decreases, but the ability to support required numeric ranges may be compromised
Solution Approach 1:
The patent performs preliminary analysis of class definitions and storage item requirements before allocating memory. By analyzing the numeric ranges actually used by storage items during program execution, the system determines appropriate reduced sizes in advance. This preliminary action ensures that size reduction does not compromise numeric range support, as the reduced size is specifically tailored to match the actual requirements.
Solution Approach 2:
The patent implements a feedback mechanism through validation checks after speculative size reduction. The system monitors whether the reduced storage item size adequately supports the required numeric ranges during runtime, and can trigger recovery actions if the reduction proves insufficient. This feedback loop ensures reliability is maintained while achieving memory optimization.
3Quantity of substance
If class definitions are analyzed and modified at runtime to optimize storage item sizes, then memory usage is reduced, but device complexity increases
Solution Approach 1:
The patent performs the complex analysis and modification work in advance during class loading, before runtime object creation. By analyzing class definitions and determining optimized storage item sizes during this preliminary phase, the system avoids repeated complex processing during runtime. The results of this preliminary analysis are then reused during object creation, reducing runtime complexity while achieving memory optimization.
Data Source
AI summary
The present invention for reducing memory usage of an object oriented program. The object oriented program comprises class definitions used to create objects, each class definition providing at least one function that can be run in respect of objects created from that class definition, and identifying a number of storage items to be provided in memory for each object to store data values associated with that object. The method involves determining an original size associated with each storage item, and analysing the class definition to identify any numeric ranges associated with the storage items. For each storage item for which a numeric range is identified, it is determined if the original size can be reduced whilst still supporting the numeric range, and if so a modified size less than the original size is allocated to that storage item. Thereafter, the class definition is altered having regard to any storage element that has been allocated a modified size.


