Split memory.fs into static and dynamic parts