Be more efficient about allocating duplicate stuff and on the stack vs heap

This commit is contained in:
Arnout Engelen
2013-05-12 19:37:36 +00:00
parent b56e2f16fe
commit f13ac22151
2 changed files with 34 additions and 54 deletions

View File

@@ -26,12 +26,11 @@
* quickly, too :) */
#include "nethogs.h"
// #define PROGNAME_WIDTH 200
struct prg_node {
long inode;
int pid;
char name[PROGNAME_WIDTH];
pid_t pid;
char * name;
};
struct prg_node * findPID (unsigned long inode);