set total memory at build time, since it needs to grow every time