▲ | openasocket 8 days ago | |||||||||||||||||||||||||||||||
Cool! Looks like is used dynamic loading. Which is certainly workable. One downside is that while dynamic loading is well-supported, dynamic unloading is generally not. Meaning if you are using dynamic loading and re-loading for hot updates the server process will start to accumulate memory. Not a huge issue of the server process is periodically restarted, but can potentially cause weird bugs. You might be able to make something more robust by forking and loading the modules in a separate process. Then do something fancy with shared memory between the main process and the module processes. But I haven’t looked into this much | ||||||||||||||||||||||||||||||||
▲ | delusional 8 days ago | parent | next [-] | |||||||||||||||||||||||||||||||
Once you start forking wouldn't it make more sense to just exec? Woops, CGI. | ||||||||||||||||||||||||||||||||
▲ | shakna 8 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Doesn't dlclose unload things...? > If the reference count drops to zero and no other loaded libraries use symbols in it, then the dynamic library is unloaded. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | warothia 8 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||
Oh really interesting, will look into it! Was afraid it would leak memory. | ||||||||||||||||||||||||||||||||
|