Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <5.1.0.14.1.20010811132225.0295ed60@mail.chariot.net.au> X-Sender: mcf AT mail DOT chariot DOT net DOT au X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 11 Aug 2001 13:26:15 +0930 To: cygwin AT cygwin DOT com From: Mike Fahlbusch Subject: Re: - Memory allocation In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed At 10:15 10-08-01 +0100, you wrote: Putting this compile flag in can reduce the size of your executable by many megabytes and help get rid of the problem, as well as improving build and run times. One program I wrote is reduced from 4,000 Kb to 600 K with this one flag. `-fconserve-space' Put uninitialized or runtime-initialized global variables into the common segment, as C does. This saves space in the executable at ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the cost of not diagnosing duplicate definitions. If you compile with this flag and your program mysteriously crashes after `main()' has completed, you may have an object that is being destroyed twice because two definitions were merged. >I've just compiled a 35Meg program with some static and some dynamic >memory allocation, under cygwin 1.3.2. When I run the executable it >gives the error "Program too big to fit in memory". The program I am >using has previously been run on Unix and Linux on the same underlying >PC architechture. The machine I'm running it on has 128Meg of memory and >the program has run on a machine with half this much before. I think >that the problem is to do with how cygwin allocates memory, or an old >version of malloc. Previous replies to this kind of question have talked >about having a .bin as part of the PATH. >Can anyone out there give me the lowdown on how this would work, and any >other things to try? Thanks. - Regards, Mike I'm not addicted to the Internet. I only use it once a day, and I can stop whenever I want. -- 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/