https://codereview.appspot.com/561390043/diff/567180043/lily/include/smobs.hh File lily/include/smobs.hh (right):
https://codereview.appspot.com/561390043/diff/567180043/lily/include/smobs.hh#newcode312 lily/include/smobs.hh:312: static size_t count; On 2020/02/09 03:29:26, Dan Eble wrote: > It seems that this is initialized to zero because it is static, but if it simply > had an "= 0", I wouldn't have had to go refresh my memory with a web search. > > Is it correct that there are no static Smobs anywhere in the program? If there > were, it would be responsible to spend some time checking whether this could be > affected by the "static initialization order fiasco." (Maybe you already have.) I've added an = 0 to the code in .cc. FWIW, This behavior is ANSI C (C89 even), which is a tiny standard compared to the C++11 standard, so I think it is reasonable to expect that people know this. Smobs are objects exposed as SCM values, so it is impossible to create them before GUILE is booted up; the protected status of the Smob_core ctor enforces this. https://codereview.appspot.com/561390043/diff/567180043/lily/smobs.cc File lily/smobs.cc (right): https://codereview.appspot.com/561390043/diff/567180043/lily/smobs.cc#newcode23 lily/smobs.cc:23: #include <gc/gc.h> On 2020/02/09 09:25:20, hahnjo wrote: > You probably want this to be guarded by GUILEV2? Done. https://codereview.appspot.com/561390043/diff/567180043/lily/smobs.cc#newcode46 lily/smobs.cc:46: printf ("bytes per obj %d\n", size / count); On 2020/02/09 09:25:20, hahnjo wrote: > Please remove before committing. Done. https://codereview.appspot.com/561390043/