Merge "Remove unused buffer allocation functions" into nextgenv2