From: Jack Lloyd <lloyd@acm.jhu.edu>
To: "Bansal, Shashank" <Shashank.Bansal@Dresdner-Bank.com>
Cc: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>
Subject: Re: Query
Date: Thu, 06 Dec 2001 05:19:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.30.0112060810550.27655-100000@sol.galaxy.acm.jhu.edu> (raw)
In-Reply-To: <81D792FDA471D21190DB0008C7A41A0601C02FDB@kbi01ea0.wwz1me.mail.dresdner.net>
On Thu, 6 Dec 2001, Bansal, Shashank wrote:
> Hi,
>
> I wished to create some large dimensional arrays in a program (6000x1000)
> and it fails to upload this memory (stack overflow). As soon as i reduce the
> dimension of arrays..it works perfectly.
Most likely you have a limit in place that limits the size of your stack.
Assuming you're running on a Unix system, try running the command `ulimit
-s`; that will tell you how much stack space you can allocate. You may be
able to raise this limit.
6000x1000x4 (array of ints), is about 22 megabytes. I suppose it is
possible that some machines and/or operating systems will not let you use
this much stack space ever.
> Could u help me out. I have tried this on different machines.
> Could you also tell if I could create virtual memory or somethign of that
> sort for the program.
The best solution is probably to use the C malloc function or the C++ new
operator to create the memory, or use C++'s vector<> type.
-Jack
next prev parent reply other threads:[~2001-12-06 13:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-06 1:37 Query Bansal, Shashank
2001-12-06 1:45 ` Query Bansal, Shashank
2001-12-06 5:19 ` Jack Lloyd [this message]
2001-12-06 7:44 ` Query Tim Prince
-- strict thread matches above, loose matches on Subject: below --
2003-04-24 11:48 Query Vijay Kamath
2003-04-24 12:25 ` Query Andrew Haley
2002-03-01 21:14 query sunil suhas petwe
2002-03-10 4:44 ` query Andrea 'Fyre Wyzard' Bocci
2001-04-19 3:29 Query MNShukla
2001-04-19 5:51 ` Query Nick Clifton
2001-04-19 21:54 ` Query MNShukla
2001-04-20 3:29 ` Query Philip Blundell
2001-04-19 9:47 ` Query Toshi Morita
2001-01-22 6:20 Query MNShukla
2001-01-22 6:27 ` Query Richard Earnshaw
2001-01-22 12:28 ` Query Philip Blundell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.30.0112060810550.27655-100000@sol.galaxy.acm.jhu.edu \
--to=lloyd@acm.jhu.edu \
--cc=Shashank.Bansal@Dresdner-Bank.com \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).