# General Notes Some implementation notes and things which we may want to address in the future. ## Memory Management We’ll likely want to *not* use `mimalloc` by default due to memory overheads, but perhaps it’s a win on high volume servers? In that case we need a way to opt in, but it’s not obvious how that might be done since we need to configure it quite early. It would even be preferable to not even compile with mimalloc to avoid the unfortunate way they initialize using TLS mechanisms in more recent versions since this does not play well with static linking. Instead of `mimalloc` it may be preferable to use `rpmalloc` instead as it is simpler and we have internal developer support if necessary. ## Testing `doctest` has some thread local state which can unfortunately end up running after the main thread has exited and torn everything down. When it tries to free memory after main has exited things go bad. Currently this mostly ends up being an issue when running tests in the debugger. Some heuristics have been implemented to try and wait for all threads to exit before continuing shutting down but it does not feel like a proper solution. # Hub ## Data Obliteration We need to support data obliteration on a module level. This means removing any local state for a given module id and also any cold data. Add ability to register service with Consul via REST API