Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sourceware.cygnus.com Delivered-To: mailing list cygwin@sourceware.cygnus.com Date: Mon, 17 Apr 2000 20:20:17 -0400 Message-Id: <200004180020.UAA25301@envy.delorie.com> From: DJ Delorie To: nikulin@actsw.amat.com CC: cygwin@sourceware.cygnus.com In-reply-to: <004e01bfa8bb$23346410$35758798@mis.amat.com> (nikulin@actsw.amat.com) Subject: Re: Help! cygwin's malloc does not work References: <004e01bfa8bb$23346410$35758798@mis.amat.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@sourceware.cygnus.com