Compiler Memory Model Selection for Computed Entity Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing programming languages face inefficiencies in memory management for computed entities, particularly in balancing ease of use for developers with memory and computational efficiency, especially when dealing with user-defined types and objects that require manual or automatic memory allocation.

Innovation Solution

A compiler with a Low-Level Memory Management (LLMM) module analyzes source code to identify computed entities, calculates resource costs, and selects an appropriate memory model for each, automatically generating instructions for memory allocation and deallocation at compile time, ensuring efficient memory management without manual intervention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If manual memory management is implemented for computed entities, then memory allocation efficiency is improved, but developer complexity and ease of use deteriorate

Engineering Contradiction:
Improvememory allocation efficiencyVSAvoiddeveloper complexity
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The system performs self-service memory management by automatically analyzing source code to identify computed entities, calculating their resource costs, and selecting appropriate memory models without requiring manual developer intervention. The compiler autonomously generates allocation and deallocation instructions, eliminating the need for developers to write explicit memory management code while maintaining optimization efficiency.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The LLMM module acts as an intermediary between the source code and the compilation process. It inserts memory management calls into the intermediate representation (IR) of the code, serving as a mediator that automatically handles the complexity of memory allocation while preserving the simplicity of the original source code for developers.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If automatic memory allocation is used for computed entities, then ease of use is improved, but memory usage efficiency and computational resources worsen

Engineering Contradiction:
Improveease of useVSAvoidmemory usage efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The system changes the parameter of memory management by introducing multiple memory models (e.g., eager allocation, lazy allocation, on-demand allocation) that can be selected based on calculated resource costs. This allows the memory allocation strategy to be dynamically adjusted according to the specific characteristics of each computed entity, optimizing both ease of use and memory efficiency.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

Different memory models are applied to different computed entities based on their individual resource cost characteristics. Instead of using a uniform memory allocation strategy for all entities, the system analyzes each entity's specific requirements and assigns the most appropriate memory model locally, thereby optimizing overall memory usage efficiency while maintaining ease of use.

Inventive Principle:
Principle #3Local quality

3Speed

If computed entities are always allocated in memory, then access speed is improved, but memory consumption increases

Engineering Contradiction:
Improveaccess speedVSAvoidmemory consumption
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The system introduces dynamic memory allocation strategies where the memory model for each computed entity can be adjusted based on runtime conditions and resource cost calculations. Entities with high access frequency and low computation cost are allocated eagerly for fast access, while entities with low access frequency or high computation cost use lazy or on-demand allocation to reduce memory consumption.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system employs periodic evaluation of resource costs and usage patterns to dynamically adjust memory allocation strategies. By periodically analyzing access patterns and recomputing resource costs, the system can switch between different memory models (eager, lazy, on-demand) to optimize the balance between access speed and memory consumption based on changing conditions.

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS20260056721A1Low-level memory management of computed entities
Publication Date: 2026.02.26 ZOHO OFFICE SUITE
  • US20260056721A1 patent drawing
  • US20260056721A1 patent drawing
  • US20260056721A1 patent drawing

AI summary

A compiler comprises a low-level memory management (LLMM) module that locates computed entities within source code. Each computed entity is analyzed, and resource costs associated with each computed entity are calculated. A memory model is selected for each computed entity, based on memory use, computational complexity, and other factors. User-defined memory model assignment is supported. The compiler auto-generates instructions for allocating memory for, computing, and deallocating memory for each computed entity. The instructions generated for each computed entity will vary based on its assigned memory model. A variety of embodiments are disclosed for auto-generating these instructions during compile time at differing phases of compilation. In all of those, with the resultant executable code, memory is allocated and freed at runtime automatically and accurately without the intervention in source code by a programmer.