#include "../include/daemon.h" #include #include #include int main() { skeleton_daemon(); while (1) { //TODO: Insert daemon code here. syslog (LOG_NOTICE, "First daemon started."); // Calculate 1 GB in bytes (1024 * 1024 * 1024) size_t mem_size = 1024 * 1024 * 1024; // Allocate the memory char *data = (char*)malloc(mem_size); sleep (20); free(data); break; } syslog (LOG_NOTICE, "First daemon terminated."); closelog(); return EXIT_SUCCESS; }