Re: [Dev-C++] Coreleft() alternative
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2006-02-16 15:33:27
|
With DOS, I'm meant 16-bit MS-DOS without use of any DOS-extender to get access to extra memory. If you are using Dev-C++, you might be porting it to a 32-bit comand-line application, but even if running in text mode, the application will have access to just as much memory as a graphical application. The MinGW port of gcc can not generate old 16-bit applications, even if I know about a number of people who have created stub scripts/applications to allow old 16-bit compilers to look and behave as MinGW. /Per W On Thu, 16 Feb 2006, DJPlata wrote: > Well, maybe I forgot to mention that the ported program will still be > running under DOS, I'm > not porting it to a Windows application. So I assume memory cossumption is > still an issue? The 640 KB limmitation is stille there, isn't it? > > ----- Original Message ----- > From: "Per Westermark" <pw...@ia...> > To: "Patrick Hens" <Pat...@pa...> > Cc: <dev...@li...> > Sent: Thursday, February 16, 2006 2:03 PM > Subject: Re: [Dev-C++] Coreleft() alternative > > > > It isn't so easy to return amount of memory left in a Windows environment, > > since the memory architecture looks so much differnt. > > > > Howerver, i assume that the old program was running under DOS, i.e. > > limited to 640kB memory. Because of the great increase of available memory > > together with swap space, most programs don't need to bother keeping track > > of amount of free space. > > > > If you really want to look into it, there are a number of Win32 API calls > > to check on the memory subsystem, but is your program regularly > > expected to consume 50-500 MB or more? > > > > The two main things to care about are: > > - not leaking memory, maging the app requiring regular restarts. > > - handling a failed memory allocation (NULL pointer or exception depending > > on how application is configured to behave). > > > > Just for fun, the app might keep track of amount of memory it has > > allocated, to warn users that operation xx might require huge amounts of > > memory (for example undo of a global search/replace in a megalarge > > spreadsheet, text document, ...) > > > > /Per W > > > > On Thu, 16 Feb 2006, Patrick Hens wrote: > > > >> Hi, > >> > >> I'm porting some c source code for a DOS program written with Borland. > >> Now I've noticed that the Devc libraries do not contain the coreleft() > >> function. I would like to know the amount of free memory left in my > >> program. > >> > >> Does anyone know an alternative way to do this? > >> > >> PS: I've tried to search the archives, but the search engine does not > >> seem to work (Can not connect to server). Did not find any answers with > >> Google either. > >> > >> Thanks in advance, > >> > >> Patrick Hens > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > > files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > |