memory allocation tweaks