-
Notifications
You must be signed in to change notification settings - Fork 0
Server Compile Settings
Most of the compile time settings can be changed by editing the settings.h file (located at 'include/settings.h'). The actual settings are represented as #define statements like the following:
#define DEBUG
Some settings are toggle-able so you can toggle them by uncommenting them/commenting them out like so:
Toggle Off:
//#define DEBUG
Toggle On:
#define DEBUG
Now that the basics are out of the way lets look at the actual settings.
NOTE: By default SSC is configured to work well, changing these settings will change SSC. It is recommended to backup the settings.h file before changing anything.
//#define DEBUG
Uncommenting this will result in ALOT of debug information being printed to the log/stdout, useful for developing but unneccessary for actual builds. By default it is commented out.
#define SSCS_CUSTOM_MALLOC
#ifdef SSCS_CUSTOM_MALLOC
#include "protected_malloc.h"
#else
#define cmalloc(size) calloc(1,size)
#define cfree(ptr) free(ptr)
#define cmalloc_init() puts("")
#endif
Toggle-able setting. If defined, heap allocation is secure against possible 0-day vulnerabilites in SSC. Downside is ~4-7KB overhead per allocation.
//#define SSCS_CLIENT_FORK
Toggle-able setting. If defined -> SSC forks for every client. Better Security, worse performance. If not defined, SSC will spawn a thread for each client, resulting in less memory overhead.