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

From: starfish524 DDong <starfish524_at_hotmail.com>
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
sysadmin@astro.su.se
zoo11@mail.hst.co.kr
Sudheesh

Answers
========

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

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:

http://www.mpi-sb.mpg.de/~jh/Solaris4GB.html

It may help....

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



Regards,
D.Dong






>From: "starfish524 DDong" <starfish524@hotmail.com>
>To: sunmanagers@sunmanagers.org
>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
>google.com.
>
>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.
>
>TIA.
>
>Regards,
>D.Dong
>




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
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