View Single Post
Old Oct 23rd, 2006, 9:05 PM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Cat *aRover[300000];
defines an array of 300,000 pointers; for a typical 32-bit machine, 1.2 megabytes.

Cat aRover [300000];
defines an array of 300,000 Cats; a much larger quantity. Neither of those sizes are to be considered "severely limited". Severely limited is when you have to spend 3 weeks whittling out 7 bytes so you don't have to buy another 2K EEPROM in production quantities. That's at old sizes and old prices, but you get the picture.

If you need housing for 300,000 cats, you should consider spaying/neutering .

As I mentioned, the heap is available for multiple processes. If everyone used their share fairly, or if you added all the stack made available for ALL processes, you'd probably recognize the equality.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote