|
Serene Runtime 1.0.0-dev
C runtime for the Serene programming language
|
Engine is a structure to own the long living and main pieces of the compiler. More...
#include <engine.h>
Data Fields | |
| _Atomic srn_object_id_t | object_id_counter |
| An unsigned counter to allocate object ids atomically. | |
| srn_configuration_t | config |
| The runtime's tunable knobs, the single source for every configurable value (see configuration.h). | |
| srn_mm_t * | mm |
| Memory manager. | |
| srn_scheduler_t * | scheduler |
| The fiber scheduler, that is the entry point of the fiber subsystem. | |
| srn_reactor_t * | reactor |
| The I/O reactor, that is in charge of handling everything I/O. | |
| srn_seed_t | seed |
| We use the seed for hashing and the value will be generated at random for each new context. | |
Engine is a structure to own the long living and main pieces of the compiler.
There will be only oe instance of the engine at anytime.
| srn_configuration_t srn_engine_t::config |
The runtime's tunable knobs, the single source for every configurable value (see configuration.h).
Held by value, read-only once the engine is up.
| _Atomic srn_object_id_t srn_engine_t::object_id_counter |
An unsigned counter to allocate object ids atomically.
Any object in Serene must have a unique id, this id is not guaranteed to be the same on each run. We use this id as the routing key on the context level to connect different pieces of information related to the same object together. ONLY INTERACT WITH THIS VIA allocate_object_id.
| srn_reactor_t* srn_engine_t::reactor |
| srn_scheduler_t* srn_engine_t::scheduler |
| srn_seed_t srn_engine_t::seed |
We use the seed for hashing and the value will be generated at random for each new context.
There's concern about hashmap collioson DoS attacks but as far as I can see other compilers are doing a similar thing with a non-cryptographic hashing function. we use xxHash but others are using the non-cryptographic version of SipHash with a random seed as well.