More memory allocation tweaks.