|
C-Menu 0.2.9
A User Interface Toolkit
|
The "grind" is pronounced with a short 'i' – ie. "grinned" (rhymes with send, mend, tinned, friend, spend, lend, bend, fend, blend"). This document explains how to run <a href="https://valgrind.org/" >Valgrind</a> against C-Menu and what to expect in its output. <hr> @section background Background Valgrind's <tt>--show-leak-kinds=all</tt> mode reports four categories of memory at program exit: <table class="markdownTable"> <tr class="markdownTableHead"> <th class="markdownTableHeadNone"> Category
Meaning
definitely lost
Memory that can no longer be reached — a true leak.
indirectly lost
Memory reachable only through a definitely-lost block.
possibly lost
Heuristic: may or may not be reachable.
still reachable
Memory still pointed to by a live pointer at exit. Often intentional (library caches, global singletons, etc.).
C-Menu aims for zero definitely lost / indirectly lost / possibly lost bytes, and suppresses the known ncurses still reachable allocations that the ncurses library intentionally retains as global caches.
src/valgrind.supp suppresses the following known-harmless ncurses still reachable records (all rooted in frames such as _nc_first_db, _nc_setupterm, _nc_acs_map, and update_getenv inside libncursesw / libtinfo). These allocations are reachable through ncurses global state and are freed by the OS on process exit; suppressing them keeps Valgrind output actionable.
This builds menu (if needed) and then runs:
You can substitute form, pick, view, or ckeys in place of menu.
With the suppression file applied, Valgrind should report:
Any non-zero definitely lost, indirectly lost, or possibly lost values indicate a real leak that should be investigated.