Thread (6 messages) 6 messages, 3 authors, 2012-09-20

Maximum size of data segment used by c program

From: Rajat Sharma <hidden>
Date: 2012-09-17 11:07:24

On Mon, Sep 17, 2012 at 4:34 PM, devendra.aaru [off-list ref] wrote:
quoted
On Mon, Sep 17, 2012 at 6:17 AM, Rajat Sharma [off-list ref] wrote:
quoted
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.

#include <sys/time.h>
#include <sys/resource.h>

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.
quoted
Thanks,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help