Allocate as much memory as you claim to need.
Actually store the created polys

This is why we don't write two identical functions, kids.