update memory growth code