SUMMARY: malloc in Solaris 2.5.1, 2.6,7 and 8

From: starfish524 DDong <>
Date: Wed Jan 16 2002 - 02:16:22 EST
Hi All,

Thank you very much for your response. I've summarised and abstracted
some of the replies as in below.

Specially thanks to
Casper Dik
Octavio Alvarez
Rafael Angarita
Convey Simon
Dave Zarnoch


Malloc() is a library call that allocates memory from its memory pool
and the system itself.  (There are several different malloc

The maximum size of all malloc() calls is governed by three things:

   - whether it's a 32 or 64 bit process
   - the hardware architecture of the system (Intel, SPARC with
     differences between sun4, sun4c, sun4m and sun4u)
   - the size of the swap space

You cannot allocate more memory than your swap space allows.
You cannot allocate more memory than your virtual address space allows.
(A lot of 64 bit processes, 3.996GB for 32 bit sun4u processes, 3.75 GB
for sun4m; less for Intel (2GB?))

Where the amount of memory includes the other uses of the virtual memory.

For one single malloc and perhaps for the data segment.

You might be able to get this fixed by changing the data limit to
"unlimited" using "ulimit" or "limit" (depending on your shell)

Do a  man malloc, realloc.

malloc() is a libary call,  it dynamically allocates memory.
It is actually implemented in kernel by the system call sbrk. ( man -s 2 brk 

Look at:

It may help....

Read also the man page for ulimit(1) for setting up the limit.


>From: "starfish524 DDong" <>
>Subject: malloc in Solaris 2.5.1, 2.6,7 and 8
>Date: Tue, 15 Jan 2002 15:24:11 +0000
>Hi Sun Managers,
>First of all, I need to apologse to ask such a simple question.
>Please believe me I had do some searching on the archive and
>My understanding of the malloc is a system call that allocated heap
>memory. Please correct me and point me to the right URL for my
>knowledge if I'm wrong.
>My question is, how can I increase the malloc and what is the max
>size for Solaris 2.5.1, 2.6, 7 and 8.

Get your FREE download of MSN Explorer at
sunmanagers mailing list
Received on Wed Jan 16 01:18:21 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:32 EST