public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* enabling /largeaddressaware for cygwin in windows 7 64-bit
@ 2011-08-04 15:20 Amidon, William H.
  2011-08-04 15:54 ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Amidon, William H. @ 2011-08-04 15:20 UTC (permalink / raw)
  To: cygwin; +Cc: Amidon, William H.

Hello,

I am not a programming expert, and i wonder if you could give me some basic advice.

I am running cygwin on a 64-bit Dell XPS, running Windows 7, with a Core i5 processor, and 12 GB of RAM installed.

The fortran 90 code I am running keeps running out of memory (virtual memory or stack overflow errors) on jobs that the computer should easily handle.  I have increased the paging memory to 36 MB, but I am afraid that CygWin is still being limited to ~ 1 GB of memory.

My problem is very similar to what is described here:
http://cygwin.com/ml/cygwin/2011-01/msg00196.html

I followed the instructions at [1] and [2] to increase the heap chunk available to cygwin, but I have also read that adding a /largeaddressaware link might further increase the amount of memory available to cygwin (see [3], which confused me a lot).  I have not been able to find clear instructions about how to do this for cygwin, could you help?

Also, I am interested in any tips about how to maximize the amount of memory available to cygwin given my 64-bit windows 7 setup!  Thanks very much for your kind help to a very helpless geologist!

Will Amidon


[1]  http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html
[2] http://cygwin.com/ml/cygwin/2010-04/msg00983.html
[3] http://www.cygwin.com/ml/cygwin-developers/2011-06/msg00002.html



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: enabling /largeaddressaware for cygwin in windows 7 64-bit
  2011-08-04 15:20 enabling /largeaddressaware for cygwin in windows 7 64-bit Amidon, William H.
@ 2011-08-04 15:54 ` Corinna Vinschen
  2011-08-04 17:37   ` Charles Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2011-08-04 15:54 UTC (permalink / raw)
  To: cygwin

On Aug  4 15:19, Amidon, William H. wrote:
> Hello,
> 
> I am not a programming expert, and i wonder if you could give me some
> basic advice.
> 
> I am running cygwin on a 64-bit Dell XPS, running Windows 7, with a
> Core i5 processor, and 12 GB of RAM installed.
> 
> The fortran 90 code I am running keeps running out of memory (virtual
> memory or stack overflow errors) on jobs that the computer should

The main thread has a 2 Megs stack by default (Windows default).
If you're running out of stack space, there's not much we can do.
There's some way to define the default stacksize in the executable
header but off the top of my head I don't know how to change it.

> easily handle.  I have increased the paging memory to 36 MB, but I am
> afraid that CygWin is still being limited to ~ 1 GB of memory.

It's not.  It's limited to 2 Gigs usually, being a 32 bit DLL.  Only by
setting the large address awareness flag in the executable (not the
DLL!) you get a max of 4 Gigs of memory on 64 bit Windows.

> My problem is very similar to what is described here:
> http://cygwin.com/ml/cygwin/2011-01/msg00196.html
> 
> I followed the instructions at [1] and [2] to increase the heap chunk

[2]?  That's not for 64 bit Windows.  If you tried that, take it back.

> available to cygwin, but I have also read that adding a
> /largeaddressaware link might further increase the amount of memory
> available to cygwin (see [3], which confused me a lot). 

If that confused you, you should probably not tamper with these
settings.  The maximum you should try is this:

- Revert the settings from [1].
- Download the latest Cygwin developer snapshot (only the DLL) from
  http://cygwin.com/snapshots.
- peflags --bigaddr=1 your_executable.exe

If that doesn't help, you're out of luck.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: enabling /largeaddressaware for cygwin in windows 7 64-bit
  2011-08-04 15:54 ` Corinna Vinschen
@ 2011-08-04 17:37   ` Charles Wilson
  2011-08-04 18:17     ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Charles Wilson @ 2011-08-04 17:37 UTC (permalink / raw)
  To: cygwin

On 8/4/2011 11:53 AM, Corinna Vinschen wrote:
> On Aug  4 15:19, Amidon, William H. wrote:
>> The fortran 90 code I am running keeps running out of memory (virtual
>> memory or stack overflow errors) on jobs that the computer should
> 
> The main thread has a 2 Megs stack by default (Windows default).
> If you're running out of stack space, there's not much we can do.
> There's some way to define the default stacksize in the executable
> header but off the top of my head I don't know how to change it.

The linker options:

`--stack RESERVE'
`--stack RESERVE,COMMIT'
     Specify the number of bytes of memory to reserve (and optionally
     commit) to be used as stack for this program.  The default is 2Mb
     reserved, 4K committed.  [This option is specific to the i386 PE
     targeted port of the linker]

Obviously, the OP would need to pass these 'thru' the gfortran compiler
using
	-Wl,--stack,RESERVE
or	-Wl,--stack,"RESERVE,COMMIT" (may not work; there's a problem with
both ld and gcc using ',' as a delimiter)

--
Chuck

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: enabling /largeaddressaware for cygwin in windows 7 64-bit
  2011-08-04 17:37   ` Charles Wilson
@ 2011-08-04 18:17     ` Corinna Vinschen
  2011-08-04 22:17       ` Charles Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2011-08-04 18:17 UTC (permalink / raw)
  To: cygwin

On Aug  4 13:37, Charles Wilson wrote:
> On 8/4/2011 11:53 AM, Corinna Vinschen wrote:
> > On Aug  4 15:19, Amidon, William H. wrote:
> >> The fortran 90 code I am running keeps running out of memory (virtual
> >> memory or stack overflow errors) on jobs that the computer should
> > 
> > The main thread has a 2 Megs stack by default (Windows default).
> > If you're running out of stack space, there's not much we can do.
> > There's some way to define the default stacksize in the executable
> > header but off the top of my head I don't know how to change it.
> 
> The linker options:
> 
> `--stack RESERVE'
> `--stack RESERVE,COMMIT'
>      Specify the number of bytes of memory to reserve (and optionally
>      commit) to be used as stack for this program.  The default is 2Mb
>      reserved, 4K committed.  [This option is specific to the i386 PE
>      targeted port of the linker]
> 
> Obviously, the OP would need to pass these 'thru' the gfortran compiler
> using
> 	-Wl,--stack,RESERVE
> or	-Wl,--stack,"RESERVE,COMMIT" (may not work; there's a problem with
> both ld and gcc using ',' as a delimiter)

Wouldn't that be an option for peflags?  It's just some info in the
file header...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: enabling /largeaddressaware for cygwin in windows 7 64-bit
  2011-08-04 18:17     ` Corinna Vinschen
@ 2011-08-04 22:17       ` Charles Wilson
  2011-08-05  6:33         ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Charles Wilson @ 2011-08-04 22:17 UTC (permalink / raw)
  To: cygwin

On 8/4/2011 2:17 PM, Corinna Vinschen wrote:
> On Aug  4 13:37, Charles Wilson wrote:
>> Obviously, the OP would need to pass these 'thru' the gfortran compiler
>> using
>> 	-Wl,--stack,RESERVE
>> or	-Wl,--stack,"RESERVE,COMMIT" (may not work; there's a problem with
>> both ld and gcc using ',' as a delimiter)
> 
> Wouldn't that be an option for peflags?  It's just some info in the
> file header...

Oh, sure, peflags COULD be extended to twiddle any of the PE header
values, although I'm not sure that's something you'd want to do to
"every .exe on your system" (i.e. not peflagsall).

PTC...

--
Chuck


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: enabling /largeaddressaware for cygwin in windows 7 64-bit
  2011-08-04 22:17       ` Charles Wilson
@ 2011-08-05  6:33         ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2011-08-05  6:33 UTC (permalink / raw)
  To: cygwin

On Aug  4 18:17, Charles Wilson wrote:
> On 8/4/2011 2:17 PM, Corinna Vinschen wrote:
> > On Aug  4 13:37, Charles Wilson wrote:
> >> Obviously, the OP would need to pass these 'thru' the gfortran compiler
> >> using
> >> 	-Wl,--stack,RESERVE
> >> or	-Wl,--stack,"RESERVE,COMMIT" (may not work; there's a problem with
> >> both ld and gcc using ',' as a delimiter)
> > 
> > Wouldn't that be an option for peflags?  It's just some info in the
> > file header...
> 
> Oh, sure, peflags COULD be extended to twiddle any of the PE header
> values, although I'm not sure that's something you'd want to do to
> "every .exe on your system" (i.e. not peflagsall).
> 
> PTC...

Will do :)


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-05  6:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-04 15:20 enabling /largeaddressaware for cygwin in windows 7 64-bit Amidon, William H.
2011-08-04 15:54 ` Corinna Vinschen
2011-08-04 17:37   ` Charles Wilson
2011-08-04 18:17     ` Corinna Vinschen
2011-08-04 22:17       ` Charles Wilson
2011-08-05  6:33         ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).