bluekite2000@gmail.com wrote:[color=blue]
> let me rephrase the question (given that I have a dell machine w/ xeon
> processor running fedore core 3)[/color]
The hardware on which you run your program is irrelevant in a language
newsgroup. If you think it's relevant, your question must be off-topic.
[color=blue]
> 1. Is heap a region of RAM?[/color]
No. Yes. Maybe. How can this be answered? The former is a concept
related to a running program, the latter is hardware. C++ programs run
on a virtual machine where certain things are true by definition, like
that any block you get from 'new' is contiguous.
[color=blue]
> 2. Why did my program run out of memory at precisely 2.6GB? I knew it
> was 2.6GB because I kept playing w/ the array'size which was,
> nevertheless, time-consuming. Any faster alternative?[/color]
You should ask in a newsgroup related to your OS/platform. I'm afraid
those questions cannot be answered in terms of C++ language. In C++
it is enough to allocate and deallocate arrays of some sizes narrowing
down the maximum size that can be allocated, but on many platforms the
memory when 'delete'd is not immediately returned to the process thus
making a simple binary search for the maximum impossible.
V