Generating instructions for inline memory allocation