Some bits here and there...
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "job.h"
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <pthread.h>
|
||||
|
||||
struct job_t {
|
||||
long id;
|
||||
@@ -144,9 +145,11 @@ void* get_memory(void *args)
|
||||
freepages = sysconf(_SC_AVPHYS_PAGES);
|
||||
job->buf.meta.len = sprintf( (char*)job->buf.chunk.data,
|
||||
"%ld / %ld (MB)",
|
||||
(freepages * pagesize) / 1048576 /* 1024*1024 */,
|
||||
(pages * pagesize) / 1048576 );
|
||||
((pages - freepages) * pagesize) / 1048576 /* 1024*1024 */,
|
||||
(pages * pagesize) / 1048576 );
|
||||
SSL_write(job->ssl, &job->buf, sizeof(struct msg));
|
||||
job->slot = FREE;
|
||||
return 0;
|
||||
//return 0;
|
||||
pthread_detach(pthread_self());
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user