memory allocation is optimization specific
minor changes