Rename memory.c -> syscalls.c

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2020-12-09 18:10:22 +01:00
parent 03843c7e55
commit 7459d8235b
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
27 changed files with 18 additions and 44 deletions

View File

@ -131,8 +131,8 @@ set(sources
log.h
main.c
main.h
memory.c
memory.h
syscalls.c
syscalls.h
overTime.c
overTime.h
regex.c

View File

@ -114,7 +114,7 @@
// Important: This number has to be smaller than 256 for this mechanism to work
#define NUM_RECHECKS 3
// Use out own memory handling functions that will detect possible errors
// Use out own syscalls handling functions that will detect possible errors
// and report accordingly in the log. This will make debugging FTL crashs
// caused by insufficient memory or by code bugs (not properly dealing
// with NULL pointers) much easier.
@ -124,6 +124,7 @@
#define strdup(str_in) FTLstrdup(str_in, __FILE__, __FUNCTION__, __LINE__)
#define calloc(numer_of_elements, element_size) FTLcalloc(numer_of_elements, element_size, __FILE__, __FUNCTION__, __LINE__)
#define realloc(ptr, new_size) FTLrealloc(ptr, new_size, __FILE__, __FUNCTION__, __LINE__)
#include "syscalls.h"
// Preprocessor help functions
#define str(x) # x

View File

@ -10,13 +10,12 @@
#include "FTL.h"
#include "api.h"
#include "log.h"
#include "../log.h"
#include "socket.h"
#include "request.h"
#include "config.h"
#include "memory.h"
#include "../config.h"
// global variable killed
#include "signals.h"
#include "../signals.h"
// The backlog argument defines the maximum length
// to which the queue of pending connections for

View File

@ -16,7 +16,6 @@
#include "FTL.h"
#include "args.h"
#include "version.h"
#include "memory.h"
#include "main.h"
#include "log.h"
// global variable killed

View File

@ -14,7 +14,6 @@
#undef __USE_XOPEN
#include "FTL.h"
#include "capabilities.h"
#include "memory.h"
#include "config.h"
#include "log.h"

View File

@ -10,7 +10,6 @@
#include "FTL.h"
#include "config.h"
#include "memory.h"
#include "setupVars.h"
#include "log.h"
// nice()

View File

@ -10,7 +10,6 @@
#include "FTL.h"
#include "daemon.h"
#include "memory.h"
#include "config.h"
#include "log.h"
// sleepms()

View File

@ -17,8 +17,6 @@
#include "../config.h"
// logg()
#include "../log.h"
// calloc()
#include "../memory.h"
// getAliasclientIDfromIP()
#include "network-table.h"

View File

@ -13,7 +13,6 @@
#include "network-table.h"
#include "message-table.h"
#include "../shmem.h"
#include "../memory.h"
// struct config
#include "../config.h"
// logg()

View File

@ -30,6 +30,9 @@
// reset_aliasclient()
#include "aliasclients.h"
// Definition of struct regex_data
#include "../regex_r.h"
// Prefix of interface names in the client table
#define INTERFACE_SEP ":"

View File

@ -10,12 +10,9 @@
#ifndef GRAVITY_H
#define GRAVITY_H
// global variable counters
#include "memory.h"
// clients data structure
#include "datastructure.h"
// Definition of struct regex_data
// clientsData
#include "../datastructure.h"
// regex_data
#include "../regex_r.h"
// Table indices

View File

@ -12,8 +12,6 @@
#include "network-table.h"
#include "common.h"
#include "../shmem.h"
// strdup()
#include "../memory.h"
#include "../log.h"
// timer_elapsed_msec()
#include "../timers.h"

View File

@ -25,8 +25,6 @@
#include "../config.h"
// getstr()
#include "../shmem.h"
// free()
#include "../memory.h"
static bool saving_failed_before = false;

View File

@ -10,7 +10,6 @@
#include "FTL.h"
#include "datastructure.h"
#include "memory.h"
#include "shmem.h"
#include "log.h"
// enum REGEX

View File

@ -16,7 +16,6 @@
#include "dnsmasq_interface.h"
#include "shmem.h"
#include "overTime.h"
#include "memory.h"
#include "database/common.h"
#include "database/database-thread.h"
#include "datastructure.h"

View File

@ -10,7 +10,6 @@
#include "FTL.h"
#include "files.h"
#include "memory.h"
#include "config.h"
#include "setupVars.h"
#include "log.h"

View File

@ -16,8 +16,6 @@
#include "overTime.h"
#include "database/common.h"
#include "log.h"
// global variable counters
#include "memory.h"
// global variable killed
#include "signals.h"
// data getter functions

View File

@ -10,7 +10,6 @@
#include "FTL.h"
#include "version.h"
#include "memory.h"
// is_fork()
#include "daemon.h"
#include "config.h"

View File

@ -13,8 +13,6 @@
#include "shmem.h"
#include "config.h"
#include "log.h"
// global variable counters
#include "memory.h"
// data getter functions
#include "datastructure.h"

View File

@ -11,7 +11,6 @@
#include "FTL.h"
#include "regex_r.h"
#include "timers.h"
#include "memory.h"
#include "log.h"
#include "config.h"
// data getter functions

View File

@ -11,7 +11,6 @@
#include "FTL.h"
#include "resolve.h"
#include "shmem.h"
#include "memory.h"
// struct config
#include "config.h"
// sleepms()

View File

@ -10,7 +10,6 @@
#include "FTL.h"
#include "log.h"
#include "memory.h"
#include "config.h"
#include "setupVars.h"

View File

@ -12,7 +12,6 @@
#include "shmem.h"
#include "overTime.h"
#include "log.h"
#include "memory.h"
#include "config.h"
// data getter functions
#include "datastructure.h"

View File

@ -15,8 +15,6 @@
#include "signals.h"
// logg()
#include "log.h"
// free()
#include "memory.h"
// ls_dir()
#include "files.h"
// gettid()

View File

@ -10,7 +10,7 @@
#include "FTL.h"
#include "shmem.h"
#include "memory.h"
#include "syscalls.h"
#include "log.h"
// The special memory handling routines have to be the last ones in this source file

View File

@ -3,12 +3,12 @@
* Network-wide ad blocking via your own hardware.
*
* FTL Engine
* Memory prototypes
* Syscall prototypes
*
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
#ifndef MEMORY_H
#define MEMORY_H
#ifndef SYSCALLS_H
#define SYSCALLS_H
#include "enums.h"
@ -17,4 +17,4 @@ void *FTLcalloc(size_t n, size_t size, const char *file, const char *function, c
void *FTLrealloc(void *ptr_in, size_t size, const char *file, const char *function, const int line) __attribute__((alloc_size(2)));
void FTLfree(void *ptr, const char* file, const char *function, const int line);
#endif //MEMORY_H
#endif //SYSCALLS_H

View File

@ -10,7 +10,6 @@
#include "FTL.h"
#include "timers.h"
#include "memory.h"
#include "log.h"
struct timespec t0[NUMTIMERS];