#ifndef _MAIN_H_ #define _MAIN_H_ #pragma interface #include "value.h" #include "Structures.h" #include "Object.h" #include "storage.h" #include "Process.h" #include "sockets.h" #include "Scheduler.h" // print_mem_usage is a little function i cooked up to help me track // down memory leaks ... it checks with some bizarre malloc structure // to figure out how much memory this process is consuming, then prints // out some numbers that i don't fully understand ... i just know they // go UP when you're leaking memory :-) // just ignore it unless you're planning on doing some HARDCORE memory // leak hunting and you have malloc.h on your system. // // long print_mem_usage (); // left unchecked, the server will consume all available CPU cycles on your // host machine. this is fairly annoying (of course) so by setting the // NICE_SLEEP, you will specify how many microseconds to sleep after every // cycle where nothing happens. (i.e. no non-sleeping processes) #define NICE_SLEEP 100 extern Object_Store* db; extern Mud_Sockets all_sockets; extern Scheduler all_processes; #endif /** _MAIN_H_ **/