• jim warner's avatar
    top: finally circumvent that minor libnuma memory leak · 18b1a887
    jim warner authored
    Still unhappy with a minor memory leak associated with
    libnuma, I experimented with omitting the dlclose that
    was issued at module's end. For some reason which will
    remain a mystery, the valgrind leak then went bye-bye.
    
    So this patch just omits one use of dlclose and relies
    on whatever kernel magic is at work to free the memory
    when each process ends. We kept, however, the original
    code (now commented-out) to serve as a future caution.
    
    There remains one potential (but unlikely) dlclose use
    near the original dlopen. But there will be no leak as
    that 'numa_node_of_cpu' will not yet have been called.
    This seems to be the culprit that triggers such leaks.
    
    None of this libnuma shit would likely have come close
    to hitting our fan had the numa developers provided us
    with 'new' and 'unref' functions like our newlib does.
    
    [ this commit parallels a patch in our newlib branch ]
    Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    18b1a887
Name
Last commit
Last update
..
README.top Loading commit data...
top.1 Loading commit data...
top.c Loading commit data...
top.h Loading commit data...
top_nls.c Loading commit data...
top_nls.h Loading commit data...