Maximum size of data segment used by c program
fs.rajat at gmail.com
Mon Sep 17 07:07:24 EDT 2012
On Mon, Sep 17, 2012 at 4:34 PM, devendra.aaru <devendra.aaru at gmail.com> wrote:
> > On Mon, Sep 17, 2012 at 6:17 AM, Rajat Sharma <fs.rajat at gmail.com> wrote:
> >> yes there is a limit, look at
> > getrlimit show the size as 4GiGs of RLIMIT_DATA on a 32-bit. which
> > means that its unlimited?
> I mean 4Gigs of RLIMIT_DATA is both the rlim_cur and rlim_max.
> i have a data section of size 213K, i am thinking that i should not be
> growing the data section size.
yes try the c function setrlimit, thats what I meant by looking at man page.
int getrlimit(int resource, struct rlimit *rlim);
int setrlimit(int resource, const struct rlimit *rlim);
> I have went through google and didn't found any article that says
> about the maximum data section a process can use.
> > Thanks,
More information about the Kernelnewbies