home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / c / 13610 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  3.1 KB

  1. Path: sparky!uunet!know!hri.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!umn.edu!epx.cis.umn.edu!wright
  2. From: wright@epx.cis.umn.edu (Mark Wright)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Memory
  5. Keywords: Borland C
  6. Message-ID: <1992Sep13.165452.27683@news2.cis.umn.edu>
  7. Date: 13 Sep 92 16:54:52 GMT
  8. References: <BuHH37.3BC@news.cso.uiuc.edu>
  9. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  10. Organization: University of Minnesota
  11. Lines: 49
  12. Nntp-Posting-Host: epx.cis.umn.edu
  13.  
  14. In article <BuHH37.3BC@news.cso.uiuc.edu> you write:
  15. >
  16. >  I have a rather simple question, I hope. I have the borland c++ compiler
  17. >  ( version 3.0) along with a gateway2000, which has 8meg. I need to 
  18. >  create a rather large data space +600K and I am unable to do it.
  19. >  The old dos 640k problem I suppose... If this is a faq I am sorry but
  20. >  I am just getting rather upset at this problem.....
  21. >  Any help would be appreciated...
  22. >
  23. >   Thank you in advance,
  24. >
  25. >     _paul
  26. >-- 
  27. >-----------------------------------------------------------------------
  28. >|  Log....  Log....  Log.... It is better than bad its Good.... Log!  |
  29. >|    pAul rAdjA   pradja@adsl.ece.uiuc.edu                            |
  30. >-----------------------------------------------------------------------
  31.  
  32.   Well, the answer to this is simple - you can't do it!  :-)
  33.   Actually, there are a couple of solutions:
  34. 1) do you need the data structure in memory at all times - maybe you could
  35.    write some routines to cache the data structure in and out from disk.
  36.    Of course this may result in a DRASTIC reduction in performance.
  37. 2) To get around DOS's 1024k memory limit (which is really a 640k limit, since
  38.    the upper 384K is committed to BIOS and screen information and stuff), you
  39.    can buy a dos extender.  Phar Lap's 286 dos extender is around $500.  Yep,
  40.    pretty steep.
  41. 3) You can chuck your Borland compiler and use the public domain DJGPP compiler
  42.    which can be found at garbo.uwasa.fi   It has a built in DOS extender, and
  43.    is really an excellent product.  One problem with it is that the dos extender
  44.    is not DMPI complient and your programs will therefore not run under Windows.
  45.    Also, the fact that it is PD may create some hassles for you if you are
  46.    writing programs you want to sell - you can write to DJ about that, his (?)
  47.    address is included in the README file that comes with djgpp.  Plus, it
  48.    is really not all that easy to use.  It's a port of gnu's unix c compiler,
  49.    and has alot of quirks that don't make much sense is the DOS world (for
  50.    example it insists on using '/' as the directory seperator.  I sure hope
  51.    the reason for this was for ease of porting, and not some bone-headed
  52.    reason like 'unix is better')
  53. 4) I'm not a windows programmer, but I think that you can create >640k 
  54.    data structures in your windows programs.  Sort of the opposite problem of
  55.    3 - you will only be able to run your programs under windows, which may
  56.    involve some extensive re-writing of your I/O routines, etc...  But, this
  57.    is supported by your current compiler.
  58.  
  59. Good Luck
  60. -- 
  61. Mark Wright
  62. wright@epx.cis.umn.edu
  63.