Choosing the size of memory