From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ae395e5c11de7bc9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!news.mixmin.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: segfault with large-ish array with GNAT Date: Thu, 18 Mar 2010 19:11:02 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Thu, 18 Mar 2010 19:11:02 +0000 (UTC) Injection-Info: news.motzarella.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="7744"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KpFJ5UM4KXpoltlu5oOtglSonOmVZJc8=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:891efjfVjHrxgnUtHMPrO4R8wCw= Xref: g2news2.google.com comp.lang.ada:10626 Date: 2010-03-18T19:11:02+00:00 List-Id: expounded in news:hntlcq$u1t$1@speranza.aioe.org: >> So here's me being naive: I would have thought that Ada (or GNAT >> specifically) would be smart enough to allocate memory for large >> objects such as my long array in a transparent way so that I don't >> have to worry about it, thus (in the Ada spirit) making it harder to >> screw up. (Like not having to worry about whether arguments to >> subprograms are passed by value or by reference--it just happens.) >> >> But it seems that I will have to allocate memory for large objects >> using pointers (and thus take the memory from the heap). Is that >> right? > A couple of years ago I wrote some code to look at the (large) Netflix > data set. It used Janus Ada and ran in a 2 GB Windows system. I thought > about switching to Gnat (for faster floating point) but discovered that > would require changing all large arrays to heap allocation, so I dropped > that idea. IMO, that's a ridiculous limitation in this day and age. 2gb is wayyy too small. ;-) Warren