This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: segmentation faults and memory problems

Eric Tea wrote:

> I work on two computers, running under
> windows XP and windows XP64. The former have 1Gb of RAM and the latter
> 4Gb.
> Increasing the stack size and modifying the
> "heap_chunk_in_mb" value dont change anything to my segmentation
> fault.
> Plus "max_memory" always reply 1536Mb for both
> computers and for any "heap_chunk_in_mb" value.... (so i think i
> am not RAM limitted

It doesn't matter how much physical memory you have.  32 bit Windows
(and note that when using Cygwin with XP x64 you are still using 32 bit
mode, WOW64, as there is no x64 Cygwin) partitions the virtual memory
space into 2GB for kernel mode and 2GB for user mode.  So you start out
with a hard limit of 2GB of virtual address space, from which is
subtracted the virtual memory of all DLLs, mappings, the stack, etc. in
the process.  For a single allocation, a limit of 1.5 GB sounds about
right, given that the space is greatly fragmented by all those DLLs.

There is a /3GB switch you can add to boot.ini which changes the
partitioning to 3GB user mode and 1GB kernel mode.  However, in order
for apps to take advantage of this they have to be recompiled with a
"/3GB aware" flag set in their PE header.  And I'm not even sure if
Cygwin can work in this mode; check the archives.


Unsubscribe info:
Problem reports:

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