Bitmask Array Heap Management for Memory Fragmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing heap management schemes in network elements face challenges in minimizing memory overhead, reducing fragmentation, and optimizing search time for memory allocation and deallocation, leading to inefficiencies in data communication networks.

Innovation Solution

A bitmask array is implemented as a two-dimensional bit array, where each bit represents an allocated or free cell, and separate lists are maintained for each allocation size, along with linked lists to manage memory dynamically, reducing fragmentation and improving search efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If a traditional heap management data structure is used to track free and occupied cells, then the heap manager can maintain memory allocation information, but the memory overhead becomes huge with 8 to 28 bytes per memory allocation

Engineering Contradiction:
Improvememory overheadVSAvoiddata structure complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent uses a bitmask array as a compact copy/representation of the heap memory state. Instead of storing detailed allocation information for each memory block, the system creates a bit-level copy of the entire heap status where each bit represents the allocation state of a memory cell. This reduces overhead from bytes per allocation to bits per cell, achieving dramatic space efficiency while maintaining full tracking capability.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent fundamentally changes the parameter representation from byte-level or word-level storage to bit-level storage. By representing memory cell states as individual bits rather than bytes or words, the system achieves an 8-fold or greater reduction in overhead. The bitmask array transforms the state representation parameter from conventional data types to bitwise operations, enabling efficient memory usage.

Inventive Principle:
Principle #35Parameter changes

2Quantity of substance

If memory allocations are performed dynamically without organization, then allocation flexibility is maintained, but memory fragmentation increases significantly

Engineering Contradiction:
Improvememory fragmentationVSAvoidallocation management
Core Design Contradiction:
Quantity of substanceVSEase of operation

Solution Approach 1:

The patent segments the heap memory into individual trackable cells and organizes them using a bitmask array where each bit corresponds to a specific cell. This segmentation allows the system to track and manage each cell independently, enabling efficient identification of contiguous free blocks. The segmentation approach facilitates better memory utilization by precisely tracking which cells are free and adjacent, thereby reducing fragmentation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The bitmask array provides continuous feedback about the allocation state of each memory cell. When allocations or deallocations occur, the corresponding bits in the bitmask are updated, providing immediate feedback about available memory regions. This feedback mechanism enables the heap manager to make informed decisions about contiguous block allocation and effectively manage memory fragmentation by always knowing the current state of all cells.

Inventive Principle:
Principle #23Feedback

3Loss of time

If a simple data structure is used for heap management, then implementation simplicity is achieved, but search time for available memory increases

Engineering Contradiction:
Improvesearch timeVSAvoiddata structure complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent replaces mechanical linear search through allocation records with bitwise operations on the bitmask array. Instead of iterating through lists of allocated blocks to find free space, the system uses efficient bitwise AND, OR, and NOT operations to query the state of multiple cells simultaneously. This substitution of mechanical search with bitwise computation dramatically reduces search time while maintaining a relatively simple array-based data structure.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent transforms the one-dimensional sequential search problem into a two-dimensional bitmask array structure where cells are organized in rows and columns. This dimensional transformation enables parallel access to multiple cell states through bitwise operations, allowing the heap manager to evaluate entire rows or columns of memory cells in single operations rather than sequential iterations, thus reducing search time.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS9086950B2Method for heap management
Publication Date: 2015.07.21 EXTREME NETWORKS INC
  • US9086950B2 patent drawing
  • US9086950B2 patent drawing
  • US9086950B2 patent drawing

AI summary

A bitmask array is implemented as a two dimensional bit array where each bit represents an allocated/free cell of the heap. Groups of bits of the bitmask array are assigned to implement commonly sized memory cell allocation requests. The heap manager keeps track of allocations by keeping separate lists of which groups are being used to implement commonly sized memory cell allocations requests by maintaining linked lists according to the number of cells allocated per request. Each list contains a list of the bit groups that have been used to provide allocations for particularly sized requests. By maintaining lists based on allocation size, the heap manager is able to cause new allocation requests to be matched up with previously retired allocations of the same size. Memory may be dynamically allocated between lists of differently sized memory requests.