This is the mail archive of the cygwin@sources.redhat.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 problem


Christopher,

Some applications like to make use of so-called "anonymous virtual memory"
for allocating (huge) chunks of memory outside the malloc heap. In unix this
functionality is usually available through mmap()-ing on the special file
/dev/null or thourgh a special mmap() flag. In my application, I abstract
this functionality is a small system-specific library that in my cygnus port
actually directly uses VirtualAlloc().

sorry for that.

One of the reasons for using virtual memory is to reduce pressure on the
malloc library, especially if your application uses both small blocks and
very very large blocks, does so intensively, and is supposedly (if you do
not run out of memory, that is) long-lived.

Peter


-----Original Message-----
From: Christopher Faylor [mailto:cgf@redhat.com]
Sent: Wednesday, February 28, 2001 7:53 PM
To: 'cygwin@cygwin.com'
Subject: Re: Memory problem


On Wed, Feb 28, 2001 at 06:12:25PM +0100, Peter Boncz wrote:
>
>Christopher,
>
>My statement is about NT vs Unix, and has nothing to do with Cygwin (or its
>sbrk implementation).
>
>This is just me speaking out of experience with the exacltly the same
>(memory hungry) application on NT and on various Unixes. My experience is
>that the VirtualAlloc() implementation in NT is more prone to fragmentation
>on the long run than e.g. mmap() on Solaris and AIX. Just think that a
>request for a 450MB array can be impeded by just 4 small blocks of used
>virtual memory in awkward places. 

Mentioning VirtualAlloc in this context makes no sense.  The use of
VirtualAlloc
is hidden from the user.  There have been posts here which mention how to
increase the size of Cygwin's heap which is a monotonic block of memory.

Search for the word "heap_chunk_in_mb" in the mailing list archives for
instructions on how to increase the heap size.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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