Skip to content
STIMSMITH

Memory Allocation Minimization

Technique

Memory Allocation Minimization is a performance technique described in the RISCV-DV/eUVM context: reduce the number of runtime allocation requests, even for small or temporary values such as formatted strings, because each allocation can impose microsecond-scale runtime-manager overhead.

First seen 5/25/2026
Last seen 5/25/2026
Evidence 1 chunks
Wiki v1

WIKI

Overview

Memory Allocation Minimization focuses on reducing the number of calls that request new memory from the runtime memory manager. In the cited RISCV-DV/eUVM discussion, every memory allocation, regardless of size, may require several microseconds of runtime-manager processing. The performance issue is therefore tied strongly to allocation frequency, not only to the total amount of memory ultimately used.

Example: formatted immediates

READ FULL ARTICLE →

NEIGHBORHOOD

No graph connections found for this entity yet. It may appear in future ingestion runs.

explore full graph →

RELATIONSHIPS

1 connections
riscv-dv ← uses 95% 1e
RISCV-DV minimizes memory allocation by using fixed-size buffers instead of dynamic string allocation.

CITATIONS

6 sources
6 citations — click to expand
[1] Each memory allocation, whether large or small, may require several microseconds of runtime memory-manager processing. [PDF] Crafting a Million Instructions/Sec RISCV-DV - DVCon Proceedings
[2] SystemVerilog $sformatf allocates memory when returning a formatted string, because strings are variable-size arrays. [PDF] Crafting a Million Instructions/Sec RISCV-DV - DVCon Proceedings
[3] RISCV-DV invokes string formatting as part of post-randomization when randomizing a RISC-V instruction immediate. [PDF] Crafting a Million Instructions/Sec RISCV-DV - DVCon Proceedings
[4] eUVM avoids a formatting-time allocation by using a fixed-size character buffer inside the riscv_instr object for a 32-bit decimal immediate string. [PDF] Crafting a Million Instructions/Sec RISCV-DV - DVCon Proceedings
[5] D provides format and sformat functions, where sformat accepts user-specified scratch memory and returns a pointer to the resulting character array. [PDF] Crafting a Million Instructions/Sec RISCV-DV - DVCon Proceedings
[6] The cited optimization keeps the eventual amount of allocated memory the same but reduces the number of malloc calls by half. [PDF] Crafting a Million Instructions/Sec RISCV-DV - DVCon Proceedings