Allocate genmem[] since its too big for the stack on some systems.