Quote:
Originally Posted by
vistastar
2,don't understand
That means as I have 200 processes running like my laptop on Solaris 11, I would need more than 800 GB of RAM+swap area. This would also affect to a lesser extent most Linux installations as "always overcommit" is not the default configuration.
See this
page for some background about linux and memory overcommitment.
Quote:
3,AFAIK, on linux threads' stack is allocated on heap of the main thread and managed by thread lib.
Possibly but that was just an example. Other memory parts are neither heap nor stack, like mmaped areas (eg: shared libraries).
Quote:
4,if the operating system allocate a very large heap to a process, and malloc knows it has all the heap space, then it can also use the way it like.
Malloc can already use the whole heap space the way it likes as brk() is a cheap operation. Having all of it allocated at startup like you suggest wouldn't make that much of a difference on that side but there is no much point wasting resources, even virtual ones.