Maximum size of data segment used by c program

Mulyadi Santosa mulyadi.santosa at
Wed Sep 19 23:10:09 EDT 2012


On Mon, Sep 17, 2012 at 4:41 PM, devendra.aaru <devendra.aaru at> wrote:
> Hi all,
> Is there any limit on the maximum data segment size used by c programs?

AFAIK, both heap and stack can grow unlimited, as long as there is
enough free space in the user space address space (which is 3 GiB in
x86 32 bit).

Please note that virtual memory fragmentation in the user space
address space could also affect this. The more fragmented, the more
likely you will hit "no more free space"


Mulyadi Santosa
Freelance Linux trainer and consultant


More information about the Kernelnewbies mailing list