Date: 30 Oct 2000 17:11:24 -0000 From: "harsha " <crazyharshu@rediffmail.com> To: freebsd-questions@freebsd.org <freebsd-questions@freebsd.org> Subject: mem prob Message-ID: <20001030171124.23487.qmail@mailweb13.rediffmail.com>
next in thread | raw e-mail | index | archive | help
hi, i need some help on this. i am trying to allocate static array of objects size 70MB. the array is declared as a local variable. the executable dumped a core. i tried declaring it as a global array. i was told that the global segement is usually larger than the stack segement. but in this case the compilation itself dumped a huge core. can some one explain as to why this could be happenning. the above method worked in linux. a little probing showed that the i was execeeding the stack size. " ulimit -a ". (when the array was declared as a local variable.) then i tried something like below to change the limits. i ran a small test prog. with the following code. /* start od structure of the test prog */ struct rlimit lim; lim.rlim_cur=RLIM_INFINITY; lim.rlim_max=RLIM_INFINITY; setrlimit(RLIMIT_STACK, &lim); setrlimit(RLIMIT_DATA, &lim); /* end */ there was however no change in the limits. i had logged in as the root. i belive the hard limit can be changed only by super user processes. i am using freebsd-3.3 is there no equivalent parameter to RLIMIT_AS in freebsd? this parameter is available in linux to change the virtual memory settings. is there an alternate method to achieve what i am trying to do? thanks in advance regards harsha _____________________________________________________ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com Participate in crazy auctions at http://auctions.rediff.com/auctions/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001030171124.23487.qmail>