finding out how much memory is available with malloc, gcc, cygwin

Reini Urban rurban@x-ray.at
Tue Aug 19 15:53:00 GMT 2003


Jim Holder schrieb:
> A program similar to the one listed below works for me on Linux but not under
> Cygwin.  The idea is to find out how memory I can allocate on the machine.  The
> Cygwin version keeps going (past 700MB), reporting that it has allocated more
> memory than the machine has.  What am I doing wrong?  Thanks.

Windows uses Virtual Memory, same as linux.
That's the physical ram, plus the swap space.
   (various swapfiles per drive. on linux it's a seperate partition)

So there's no error on your side.
You can allocate that much memory on Windows, but it's probably
quite slow to use it past the physical RAM. On both systems.
Typical factor 1000 times slower.
-- 
Reini Urban


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



More information about the Cygwin mailing list