common: Move RAM-sizing functions to init.h