This is the mail archive of the 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: problem with heap, win32 error 487

Don Sharp wrote:

> Thorsten Clevorn wrote:
> >
> > Hi,
> >
> > I am trying to run a simulation in C on my Win2K-machine (the simulation
> >
> > runs perfectly on a Linux-PC)
> > The problem seems to be with the memory rquirements.
> > With certain parameters, I get some huge
> > 3-dimensional arrays that require like 20-40MB RAM.
> > When I have a size of about 22MB the simulation works fine, when I
> > increase the array size by a factor of ~1.33 (should then still be below
> >
> > but close to 32MB) it doesn't start with the error message
> > C:\cygwin\home\clevorn\wlan15\Main.exe: *** Couldn't reserve space for
> > cygwin's heap (0x20030000) in child, cygheap, Win32 error 487
> >
> > I tried two solutions posted in the mailing list for similiar problems:
> >
> > first:
> > the "gcc -Wl,--heap,50000000,--stack,--50000000 ..." solution
> > here the simulation fails at small array sizes too.
> >
> > second:
> > the "gcc -mno-cygwin ..." solution
> > here the program does start, but the only thing that happens is, if you
> > look in the task manager, the process slowly "collects" memory for about
> >
> > 90 seconds until it recaches 32MB (33xxxkB) and than the process crashes
> >
> > with the windows message " the exception unknown software exception
> > (0xc00000fd) occured in the application at location 0x6104b9ef".
> As -mno-cygwin uses native M$ libraries it seems likely that the problem
> is not of cygwin's making.
> Does it work when compiled with MSVC ?

I tried that. It works fine without the arrays (simulation size ~2MB), but as
soon as you use even the smaller arrays (that worked with cygwin) it fails. The
error message (the same one as above "unknown software exception (0xc00000fd)")
pops up immediatly, the process doesn't seem to "collect" memory. When compiling
with MSVC I get the warning about a too large image size of 4xxMB, or so. I am
also trying to avoid MSVC because I need to change the program (add additional
h-files,...) when using MSVC.
Another interesting thing I noticed is that the simulation runs faster on a Linux
550MHz than on a Win2K-cygwin 1Ghz.


Remark for the guy that sees this message floating around for several (I assume
>1) days. Stop using drugs!
Ever seen "Memento"? The guy has an interesting strategie to remember things.
(I intentionally avoided to write an extra message for this remark)

> Cheers
> Don Sharp
> > During that time the VM Size increases with the same rate, only it start at
> > values like 4xxMB or 6xxMB, depending on the array size (I have 1 GB RAM
> >
> > so the pure size of these value isn't the real problem).
> >
> > I think that the size of slightly below or even above 32MB is the cause
> > of the problem. Is there a general problem with cygwin and running
> > programs that require this amount of memory. Is there a way around this
> > problem.
> >
> > Thanks for your help!
> >
> > Regards,
> >
> > Thorsten
> >
> > $ cygcheck -s -v -r
> >
> ...snip...
> --
> Unsubscribe info:
> Bug reporting:
> Documentation:
> FAQ:         

Unsubscribe info:
Bug reporting:

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