| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
| List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
| List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
| Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
| Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
| Date: | Mon, 17 Apr 2000 20:20:17 -0400 |
| Message-Id: | <200004180020.UAA25301@envy.delorie.com> |
| From: | DJ Delorie <dj AT delorie DOT com> |
| To: | nikulin AT actsw DOT amat DOT com |
| CC: | cygwin AT sourceware DOT cygnus DOT com |
| In-reply-to: | <004e01bfa8bb$23346410$35758798@mis.amat.com> |
| (nikulin AT actsw DOT amat DOT com) | |
| Subject: | Re: Help! cygwin's malloc does not work |
| References: | <004e01bfa8bb$23346410$35758798 AT mis DOT amat DOT com> |
> Basically, it looks like cygwin can not handle large memory allocations.
Open regedit (or regedt32) and find the key
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\
Create a new DWORD value there called "heap_chunk_in_mb" that contains
the maximum amount of memory (in Mb) your application needs (watch the
hex/decimal toggle). Exit and restart all cygwin applications.
The default is 128 (i.e. 128Mb) if no registry key is set.
Here is a more interesting "max memory" program:
main()
{
unsigned int bit=0x40000000, sum=0;
char *x;
while (bit > 4096) {
x = malloc(bit);
if (x)
sum += bit;
bit >>= 1;
}
printf("%08x bytes (%.1fMb)\n", sum, sum/1024.0/1024.0);
return 0;
}
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |