-
-
Notifications
You must be signed in to change notification settings - Fork 44
Configuration Object
John Skaller edited this page Dec 14, 2018
·
1 revision
This objects gathers configuration data to control construction of the Felix world.
class RTL_EXTERN flx_config {
public:
bool debug;
bool debug_threads;
bool debug_allocations;
bool debug_collections;
bool report_collections;
bool report_gcstats;
bool debug_driver;
bool finalise;
size_t gc_freq;
size_t min_mem;
size_t max_mem;
int gcthreads;
double free_factor;
bool allow_collection_anywhere;
bool static_link;
char *filename; // expected to live forever
char **flx_argv;
int flx_argc;
// TODO: fn up in macro area
int init(int argc, char **argv);
// interface for drivers. there's more, create_frame, etc
create_async_hooker_t *ptr_create_async_hooker=nullptr;
typedef ::flx::dynlink::flx_dynlink_t *(*link_library_t)(flx_config *c, ::flx::gc::generic::gc_profile_t*);
typedef void (*init_ptr_create_async_hooker_t)(flx_config *, bool debug_driver);
typedef int (*get_flx_args_config_t)(int argc, char **argv, flx_config* c);
link_library_t link_library;
init_ptr_create_async_hooker_t init_ptr_create_async_hooker;
get_flx_args_config_t get_flx_args_config;
flx_config (link_library_t, init_ptr_create_async_hooker_t, get_flx_args_config_t);
};