delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/12/12:37:09

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: <001301c2d2bd$544cb3c0$0202040a@catdog>
From: "Kris Warkentin" <kewarken AT qnx DOT com>
To: "Ronald Landheer-Cieslak" <ronald AT landheer DOT com>
Cc: <cygwin AT cygwin DOT com>
References: <Pine DOT LNX DOT 4 DOT 44 DOT 0302121759220 DOT 14138-100000 AT localhost DOT localdomain>
Subject: Re: Malloc failing too soon under XP/2000
Date: Wed, 12 Feb 2003 12:36:52 -0500
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

This is the sort of answer I was looking for.  Thank you very much (and also
to others who replied with the same answer).  This gets me a little more
headroom.

The next problem:  even if I set heap_chunk_in_mb to 2048, it still will
only allocate up to a bit more than 1GB.  If I set it to 4096 Mb, I can't
run a bash shell anymore.

Any more ideas?

cheers,

Kris

----- Original Message -----
From: "Ronald Landheer-Cieslak" <ronald AT landheer DOT com>
To: "Kris Warkentin" <kewarken AT qnx DOT com>
Cc: <dl AT cs DOT oswego DOT edu>; <cygwin AT cygwin DOT com>
Sent: Wednesday, February 12, 2003 12:01 PM
Subject: Re: Malloc failing too soon under XP/2000


> Charles Werner explains this pretty well in:
> http://sources.redhat.com/ml/cygwin/2003-02/msg00234.html
> he also explains how to change the settings
>
> ciao
>
> rlc
>
> On Wed, 12 Feb 2003, Kris Warkentin wrote:
>
> > 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 <stdio.h>
> > #include <malloc.h>
> >
> > 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/
> >
>
>
> --
> 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/
>
>


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019