You need to start the local scope from `// step 2, get the actual "allocated" size. ...`.