Yes, this is a common practice.
Doubling is a good way to manage memory. Heap management algorithms are often based on the classic Buddy System, an easy way to deal with addressing and pooling and other problems. Knowing this, itβs good to stick with a multiple of 2 when dealing with distribution (although there are hybrid algorithms like the slab distributor to help with fragmentation, so this is not as important as it used to be several).
Knut covers it in one of his books, but I forgot the name.
See http://en.wikipedia.org/wiki/Buddy_memory_allocation
Another reason to double the size of the array is the cost of addition. You do not want each Add () operation to cause a redistribution call. If you filled N slots, there is a chance that you will need several multiple Ns anyway, the story will be a good indicator of future needs, so the object should "finish" to the next size of the arena. When doubling, the redistribution frequency falls logarithmically (Log N). Doubling is just the most convenient set (being the smallest integer factor, it is more memory efficient than 3 * N or 4 * N, plus it tends to closely monitor heap memory management models).
source share