Message-ID: <353BF5F3.1C81@cs.com> Date: Mon, 20 Apr 1998 21:27:15 -0400 From: "John M. Aldrich" Organization: Two pounds of chaos and a pinch of salt. MIME-Version: 1.0 To: Nate Eldredge CC: DJ Delorie , eliz AT is DOT elta DOT co DOT il, djgpp-workers AT delorie DOT com Subject: Re: Available memory References: <19980421011110 DOT AAA9311 AT ppp124 DOT cartsys DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Nate Eldredge wrote: > > Unfortunately, due to the wonderful and inspired structure of C > preprocessing, you can't. Something like this: > > #define coreleft #error Die, Borland luser! > > would just expand into something like this: > > bytes_free = #error Die, Borland luser!(); How about: #define coreleft \ #error Die, Borland luser! Would that not work? > But, according to Borland's docs, as far as I can see, `coreleft' is only > documented as telling how much memory is not in use. It does not guarantee > that one can actually allocate that much. Therefore, since its intended use > is only as a statistic, I don't see an actual problem with just returning > the meaningless statistics given by the DPMI functions. Okay, that's fine with me. I don't see how it can hurt anything, except that users will come whining instead that they can't allocate as much memory as coreleft() claims they can. -- --------------------------------------------------------------------- | John M. Aldrich | "A committee is a life form with six | | aka Fighteer I | or more legs and no brain." | | mailto:fighteer AT cs DOT com | | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------