From owner-freebsd-questions Mon Oct 30 9:18:53 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mailweb13.rediffmail.com (unknown [203.199.83.21]) by hub.freebsd.org (Postfix) with SMTP id 68F4D37B479 for ; Mon, 30 Oct 2000 09:18:45 -0800 (PST) Received: (qmail 23488 invoked by uid 510); 30 Oct 2000 17:11:24 -0000 Date: 30 Oct 2000 17:11:24 -0000 Message-ID: <20001030171124.23487.qmail@mailweb13.rediffmail.com> MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: mem prob From: "harsha " Content-ID: Content-type: text/plain Content-Description: Body Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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