mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 04:04:35 +03:00
Fix allocation of processes. Closes #166.
Conflicts: Process.c Process.h ProcessList.c ScreenManager.c linux/LinuxProcessList.c
This commit is contained in:
@ -10,6 +10,7 @@ in the source distribution for its full text.
|
||||
#include "LinuxProcess.h"
|
||||
#include "CRT.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
@ -22,8 +23,23 @@ typedef struct LinuxProcess_ {
|
||||
IOPriority ioPriority;
|
||||
} LinuxProcess;
|
||||
|
||||
#define Process_delete LinuxProcess_delete
|
||||
|
||||
}*/
|
||||
|
||||
LinuxProcess* LinuxProcess_new(Settings* settings, ProcessList* pl) {
|
||||
LinuxProcess* this = calloc(sizeof(LinuxProcess), 1);
|
||||
Process_init(&this->super, settings, pl);
|
||||
return this;
|
||||
}
|
||||
|
||||
void LinuxProcess_delete(Object* cast) {
|
||||
LinuxProcess* this = (LinuxProcess*) this;
|
||||
Object_setClass(this, Class(Process));
|
||||
Process_done((Process*)cast);
|
||||
free(this);
|
||||
}
|
||||
|
||||
/*
|
||||
[1] Note that before kernel 2.6.26 a process that has not asked for
|
||||
an io priority formally uses "none" as scheduling class, but the
|
||||
|
Reference in New Issue
Block a user