runtime: only allocate space for what we are saving