Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <63340-220032312163937783@M2W031.mail2web.com> X-Priority: 3 Reply-To: lhall AT rfk DOT com X-Originating-IP: 209.113.174.244 From: "lhall AT pop DOT ma DOT ultranet DOT com" To: kewarken AT qnx DOT com, dl AT cs DOT oswego DOT edu, cygwin AT cygwin DOT com Subject: RE: Malloc failing too soon under XP/2000 Date: Wed, 12 Feb 2003 11:39:37 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 X-OriginalArrivalTime: 12 Feb 2003 16:39:37.0715 (UTC) FILETIME=[5505C430:01C2D2B5] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h1CGdsu12779 Try this: http://sources.redhat.com/ml/cygwin/2001-01/msg00733.html Larry Original Message: ----------------- From: Kris Warkentin kewarken AT qnx DOT com Date: Wed, 12 Feb 2003 11:27:34 -0500 To: dl AT cs DOT oswego DOT edu, cygwin AT cygwin DOT com Subject: Malloc failing too soon under XP/2000 I'm running Windows XP with 1/2GB RAM and 2GB swap. Running Cygwin 1.3.18. Consider the following program to use as much memory as possible: #include #include int main() { void *x; unsigned long long mem=0; while((x=malloc(500000)) != NULL){ mem += 500000; memset(x, 0, 500000); printf("allocated %u\n", mem); } return 0; } If I compile and run this, it consistently stops at about 780MB. If I compile with -mno-cygwin, it doesn't fail until almost 2GB have been allocated. Any comment? Is there some sort of flag I can compile with to make the allocator more aggressive? The situation it's failing in is one where a very large library is being linked and ld is running out of memory in spite of quite a bit being available. cheers, Kris -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/