In-Memory Analytics Memory Leak Detection via Intermediary API

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In-memory analytics engines face inefficiencies due to challenges in managing volatile memory and memory leaks, especially when executing user-provided programs, which can lead to slow performance or crashes, and existing solutions like garbage collection and third-party execution environments introduce overhead and limited insight into memory usage.

Innovation Solution

An analytics engine provides a direct API for user-provided programs to allocate, access, and deallocate memory, tracking memory usage and detecting leaks by storing records of memory allocations, deallocations, and providing advanced debugging features, eliminating the need for third-party environments and reducing execution overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If user-provided programs are executed with third-party execution environments to detect memory leaks, then memory leak detection capability is improved, but execution overhead increases and insight into memory usage is limited

Engineering Contradiction:
Improvememory leak detection capabilityVSAvoidexecution overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent introduces a memory management system as an intermediary between user-provided programs and the execution environment. This system includes a memory manager that intercepts memory allocation and deallocation calls, automatically tracking memory usage without requiring third-party execution environments. The memory manager maintains allocation records and detects memory leaks by comparing allocated versus deallocated memory, providing comprehensive insight while minimizing execution overhead through integrated memory management.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If garbage collection mechanisms are used to prevent memory leaks, then memory management is automated, but execution speed decreases due to interruptions in program execution

Engineering Contradiction:
Improvememory management automationVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent implements a self-service memory management approach where the memory manager operates transparently in the background without interrupting program execution. Instead of garbage collection that pauses execution, the system uses incremental tracking of memory allocations and deallocations through interception of memory calls. The memory manager continuously updates allocation records and performs leak detection asynchronously, allowing the program to execute at full speed while memory management proceeds independently.

Inventive Principle:
Principle #25Self-service

3Reliability

If static code analysis is performed to avoid memory leaks, then memory leak prevention is improved, but the solution is limited to analytics engine code and cannot analyze user-provided programs

Engineering Contradiction:
Improvememory leak preventionVSAvoidapplicability to user-provided programs
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent extends memory leak prevention to user-provided programs by introducing a memory manager as an intermediary that operates at the execution level rather than the compilation level. The memory manager intercepts memory allocation and deallocation calls made by user-provided programs through the analytics engine's memory management interface, automatically tracking and analyzing memory usage patterns. This approach provides the benefits of static analysis (automatic detection and prevention) while being applicable to dynamic user-provided code without requiring pre-compilation or modification of user programs.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10102046B2In-memory data analytic system that provides an integrated tracking mechanism for explicit memory resources
Publication Date: 2018.10.16 ORACLE INT CORP
  • US10102046B2 patent drawing
  • US10102046B2 patent drawing
  • US10102046B2 patent drawing

AI summary

Techniques and a system are provided for managing resources used by user-provided programs. The system includes an application programming interface (API) that allows user-provided programs to access memory resources managed by functions provided by the API. The system stores memory-usage records made during memory allocations. Memory-usage records may be used to identify memory resources, analyze memory usage, and provide other features.