Conversation
dd76497 to
25075e8
Compare
stv0g
left a comment
There was a problem hiding this comment.
I only have a small request :)
But thanks a lot for the effort and debugging the issue :)
25075e8 to
2fe3b92
Compare
|
I updated the PR. Was this what you thought of? |
|
Yes great :) Just wondering did you want to keep the inconsistency intentionally?
I would opt for one of the following:
|
|
Hmm difficult ... The choice is I think I still prefer the last one. For Log there is now |
2fe3b92 to
3af1372
Compare
Okay, then lets go also with |
3af1372 to
b12ac09
Compare
|
Was this ok now, or do you want me to change anything? |
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
b12ac09 to
cb085db
Compare
fixes #799
I replaced the static constructor call of
villas::loggingandHostRamAllocator::allocatorto a function that does lazy initialization (i.e., on the first call).This avoid the undefined behavior mentioned in the issue and even avoid an explicit initialization order.
The implementation leak heap memory that will be implicitly cleaned up when the application finished. While currently not a problem, the destructors of Log and HostRamAllocator should not assume the existence of other static objects, because the deinitialization order is still undefined.
I implemented the C++ Foundaitions recommendation for this issue (see https://isocpp.org/wiki/faq/ctors#static-init-order)
This PR allows using link time optimization (
-ltogcc flag) with VILLASnode.