home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / cplus / 18635 < prev    next >
Encoding:
Internet Message Format  |  1993-01-02  |  1.6 KB

  1. Path: sparky!uunet!usc!rutgers!network.ucsd.edu!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
  2. From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: BORLAND C++ ; new int(1,000,000)
  5. Message-ID: <9300302.976@mulga.cs.mu.OZ.AU>
  6. Date: 2 Jan 93 15:40:18 GMT
  7. References: <C01upJ.FAx@fig.citib.com> <1992Dec31.185128.23173@ulysses.att.com>
  8. Sender: news@cs.mu.OZ.AU
  9. Organization: Computer Science, University of Melbourne, Australia
  10. Lines: 31
  11.  
  12. mwb@ulysses.att.com (Michael W. Balk) writes:
  13.  
  14. >ghica@fig.citib.com (Renato Ghica) writes:
  15. >> 
  16. >> Is it possible to allocate more than 640K (from extended or
  17. >> expanded memory) on a DOS 5.0 system using a borland 3.1 C++ program?
  18. >> 
  19. >> Using the huge memory model, I'm trying to do the equivalent of 
  20. >>     new int(1,000,000);  
  21. >> I have not successed. (I know I can allocate 64k+ at the time).
  22. >
  23. >According to the Borland 3.1 C++ Programmer's Guide, even though the
  24. >total static data for the huge model can exceed 64k, it must be less
  25. >than 64k within *each* model.
  26.  
  27. I think that it says each _module_, not each model.
  28. (That is, in each source file.)
  29.  
  30. >Given that statement, I don't see
  31. >how new int(1000000) could ever work.
  32.  
  33. new int(1000000) is *dynamic* allocation, so the limitations on *static*
  34. data don't apply. It is possible to allocate objects >64k, I think, but
  35. not >640k. (Get a _real_ operating system, like Linux, not this horrible
  36. MSDOS :-)
  37.  
  38. -- 
  39. Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  40. This .signature virus is a self-referential statement that is true - but 
  41. you will only be able to consistently believe it if you copy it to your own
  42. .signature file!
  43.