Re: malloc() fails: 32MB heap limit and how to work around?
Thomas Hoffmann <[email protected]> Tue, 21 Oct 2003 20:03:40 +0200
| Newsgroups | gmane.comp.ide.emx.devel |
|---|---|
| Organization | private site |
| Message-ID | <[email protected]> |
Ilya Zakharevich wrote: >On Mon, Oct 20, 2003 at 07:44:16PM +0200, Thomas Hoffmann wrote: > > >>Okay, so let me rephrase my problem: As soon as I use the -Zcrtdll >>option, the program >>cannot malloc() more than 32MB memory. >> >> > >Then you are not using EMX (read again what I wrote - carefully). >Probably some Innotech stuff? Ask them. [If I understood correct, >for some unfathomable reason Innotech started with -Zsys stuff - which >is not EMX. Not even speaking about their horrible choice of DLL >names for the "system calls" and CRTL. All that "gcc295a73.dll" >nonsense all over again.] > > Not exactly: I use gcc 3.2.1. When compiling w/o -Zcrtdll my test program uses (chk4dlls output): D:\thoffman\work\R\heap>chk4dlls heapchk2.exe Loading DLL 'emx' --> D:\USR\LIB\EMX.DLL. Loading DLL 'doscalls' --> loaded. All DLL's used by 'heapchk2.exe' could be loaded. When compiling w/ -Zcrtdll it uses (w/ -Zmt, otherwise ...s.dll instead of ...m.dll): D:\thoffman\work\R\heap>chk4dlls heapchk2.exe Loading DLL 'emx' --> D:\USR\LIB\EMX.DLL. Loading DLL 'EMXLIBCM' --> D:\USR\LIB\EMXLIBCM.DLL. Loading DLL 'gcc321m' --> D:\USR\LIB\GCC321M.DLL. All DLL's used by 'heapchk2.exe' could be loaded. BTW: Using your proposed _uflags() call at the begin of the program fixes the 32MB limit for -Zcrtdll, too. And so obviously the cited statement from the gcc 3.x readme should be read "... this port of gcc has a 32MB heap limit...". Thank you for your explanations, Thomas. -- Thomas Hoffmann [email protected] Dresden, Germany