c++.wxwindows - out of memory error
- chris elliott (24/24) May 16 2005 Digital Mars C/C++ Compiler Version 8.42.5n
- dt (12/25) May 16 2005 Hi Chris,
- chris elliott (5/10) May 31 2005 thanks doug, this was a good fix. I didn't find a reference for the -HP
- dt (6/10) May 31 2005 No problem. In the left pane, Tools->DMC, it is listed as a compiler swi...
- Walter (2/2) May 16 2005 It could be running out of memory because of a recursive expansion of a
Digital Mars C/C++ Compiler Version 8.42.5n I have a program with about 8000 lines of code, and recently added a new member function bool MyFrame::CopyTemplate (const wxString & sFile, const wxString & sDestName, const wxString & sTextToReplace) { wxString sCode = sExeRoot + sCodeDir; sCode = sCode + wxFILE_SEP_PATH ; // real code ommitted return FALSE; } If I comment out the 2 sCode lines all is well, but with them in I get the error message shown below. How can i debug the memory error? C:\wx\wxhatch>make -d -f makefile.dmc file 'wxhatch_wxhatch.obj' is older than '.\wxhatch.cpp' dmc -mn -c -owxhatch_wxhatch.obj -g -o+none -D_WIN32_WINNT=0x0400 -D__WXMSW__ -D __WXDEBUG__ -Ic:\wx\WXWIDG~1.0\include -Ic:\wx\WXWIDG~1.0\lib\dmc_lib\mswd -w- -I. -WA -Ic:\wx\WXWIDG~1.0\samples -DNOPCH -Ar -Ae -Ic:\wx\WXWIDG~1.0\contrib\ include .\wxhatch.cpp Fatal error: out of memory --- errorlevel 1
May 16 2005
"chris elliott" <biol75 york.ac.uk> wrote in message news:d69ria$1gj3$1 digitaldaemon.com...Digital Mars C/C++ Compiler Version 8.42.5n I have a program with about 8000 lines of code, and recently added a new member function bool MyFrame::CopyTemplate (const wxString & sFile, const wxString & sDestName, const wxString & sTextToReplace) { wxString sCode = sExeRoot + sCodeDir; sCode = sCode + wxFILE_SEP_PATH ; // real code ommitted return FALSE; } If I comment out the 2 sCode lines all is well, but with them in I get the error message shown below. How can i debug the memory error?Hi Chris, Don't know, it sounds weird. But, have you tried the -HPxx compiler switch. See here http://www.digitalmars.com/ctg/ctg.html I think(?) the default is -HP30, for 30 MB memory pool. I've had to use about 90 MB in some of my builds. A word of caution if you are using the IDDE (which it looks like you are not). After setting the -HP switch in the IDDE, it looks like you actually have to close and re-open the IDDE for the setting to take effect; at least I did, and it caused a bit of headache. Doug
May 16 2005
dt wrote:See here http://www.digitalmars.com/ctg/ctg.html I think(?) the default is -HP30, for 30 MB memory pool. I've had to use about 90 MB in some of my builds.thanks doug, this was a good fix. I didn't find a reference for the -HP fix in either the output of dmc or on the http://www.digitalmars.com/ctg/ctg.html web page chris
May 31 2005
"chris elliott" <biol75 york.ac.uk> wrote in message news:d7hi2i$1hbr$1 digitaldaemon.com...thanks doug, this was a good fix. I didn't find a reference for the -HP fix in either the output of dmc or on the http://www.digitalmars.com/ctg/ctg.html web page chrisNo problem. In the left pane, Tools->DMC, it is listed as a compiler switch on the web page. Cheers Doug
May 31 2005
It could be running out of memory because of a recursive expansion of a template or function. Can you try to cut it down to a minimal program?
May 16 2005