[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is Linux Unix?



Ryo Furue wrote:
Roel Schroeven <rschroev_nospam_ml@fastmail.fm> wrote in message news:<2pqpE-21c-1@gated-at.bofh.it>...
[...]

It's interesting that some of the new features are (or seem to me to be)
mainly for numerical computations, such as the "restrict" keyword and
the builtin complex numbers.

Possibly, but isn't this feature's usefullness in numerical computations quite limited if you're restricted to the size of the stack?


That's a good question.  In fact, most modern Unix/Linux systems allow
you to use as large stacksize as you like, roughly speaking.  Although
the default stakesize limit is often set to a very low value, say, 2MB,
each user can raise the limit, unless the system administrator (root)
prohibits it.  So, no.  That feature in question is very useful.

Some people believe that the stacksize limit should be kept low
(in other words, that you shouldn't use much stack), but, as far as
I know, nobody seems to be able to give a convincing argument for that
position.  I suspect that the posision is just an inertia, a remnant
of an old habit.  But, I'm ready to be convinced otherwise if somebody
has a good argument.

stack is something you do not have control over and you have no information about, it's not good to use it for large data - you cannot figure out how big it is, how much you're using, there's nothing you can do if space cannot be allocated etc. (maybe you can figure some of it out but that would be compiler specific, I think)

on the other hand when using malloc/free or new/delete you can do _something_ if there's not enough memory.

	erik



Reply to: