Ahh, the out of memory saga. The story goes GCII is limited to 2GB memory (as are other 32 bit applications...don't know why MS and a mulitude of geeks say 32 bit has a 4GB limit). Your video card must also be considered.
The tricks are those you know...disable video features...reload after upgrade but before save...disable other apps...anything to reduce memory usage. Map size and number of planets is obvious. But, in my experience the posture of ships is important. I have upgraded as few as 6,200 and as many as 12,000 ships in DA V2.01 with 700+ planets before getting the OOM error. 13,500 in DL with 450+ planets.
Mumble has upgraded 17,000 in DL...Motti 15,000 in DA.
I'm not an authority on this issue, just a fellow seeker of the holy grail.