MCPcopy Index your code
hub / github.com/NetHack/NetHack / heapmon_init

Function heapmon_init

src/alloc.c:141–149  ·  view source on GitHub ↗

If ${NH_HEAPLOG} is defined and we can create a file by that name, then we'll log the allocation and release information to that file. */

Source from the content-addressed store, hash-verified

139/* If ${NH_HEAPLOG} is defined and we can create a file by that name,
140 then we'll log the allocation and release information to that file. */
141staticfn void
142heapmon_init(void)
143{
144 char *logname = getenv("NH_HEAPLOG");
145
146 if (logname && *logname)
147 heaplog = fopen(logname, "w");
148 tried_heaplog = TRUE;
149}
150
151long *
152nhalloc(unsigned int lth, const char *file, int line)

Callers 3

nhallocFunction · 0.85
nhreallocFunction · 0.85
nhfreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected