Add missing initialization code to unit tests.
More minor fixes to the initialization of the memory subsystem.