malloc(3) vs. malloc(3x)

Paul De Bra debra at alice.UUCP
Sat Jan 7 09:39:59 AEST 1989


In article <1418 at leah.Albany.Edu> rds95 at leah.Albany.Edu (Robert Seals) writes:
>How much can a single malloc get? And why does Ultrix have 2 kinds of
>malloc, while 4.3-tahoe (the first one, I think) only has 1?
>
>Here's a little thing I wrote to see how big a chunk I could get from a
>single malloc...

For every process the kernel has to keep table of the pages of virtual
memory used by that process. The size of this table is usually fixed.
It means that a process cannot grow beyond that limit, regardless of
what any system call for finding out limits will tell you.

If your system would be configured with big tables for each process you
would hit another limit: your virtual memory, which is determined by the
size of your swap space (and possibly also your physical memory, on some
Unix versions), again, regardless of other imposed limits.

Only if you are not exceeding any of those limits the system will look
at system-call-level limits.

Paul.

-- 
------------------------------------------------------
|debra at research.att.com   | uunet!research!debra     |
------------------------------------------------------



More information about the Comp.unix.questions mailing list