delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/30/21:18:41

X-Spam-Check-By: sourceware.org
From: "Dan Stratila" <dstrat AT MIT DOT EDU>
To: <cygwin AT cygwin DOT com>
Subject: Re: malloc/new allocate twice as much?
Date: Fri, 30 Dec 2005 21:18:02 -0500
Message-ID: <000001c60db0$6e173e20$43055f12@somerville>
MIME-Version: 1.0
X-Spam-Score: -1.215
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

From: Krzysztof Duleba <krzysan at skrzynka dot pl> 
To: cygwin at cygwin dot com 
Date: Sat, 31 Dec 2005 02:23:20 +0100 
Subject: Re: malloc/new allocate twice as much? 
References: <001e01c60d96$82fc34e0$43055f12 AT somerville> 

>>This is an issue I've discovered and reproduced while trying to compile
>>polymake (see the thread "gcc crash (memory?)"). It seems that both malloc
>>and new allocate take up twice the amount of memory needed.

>>I wrote a short program to allocate and use memory in chunks
(mem-test.cpp),
>>and compiled it with g++ 3.4.4. I monitored it using the Windows Task
>>Manager. When asked to allocate 100MB in increments of 10MB, the process
>>size goes to 100MB and then drops to 0, as expected. However, the total
>>commit charge for the machine goes up by 200MB, and then drops back!

>Try the snapshot. On my laptop with XP SP2, 20051222 snapshot, 1GB RAM 
>and 1GB swap file I had no problem allocating 1.8 GB.

Yes! This solved the malloc/new problem. Thanks. I sure hope the next
release of the cygwin dll will not reintroduce this bug... ;)

Now, I am also able to compile polymake, which required g++ to consume up to
600MB of RAM and caused it to crash when I was using the old dll with the
buggy malloc/new.

Dan



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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