This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: - Memory allocation


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]