home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16011 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.9 KB  |  40 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!ira.uka.de!slsvaat!us-es.sel.de!reindorf
  3. From: reindorf@us-es.sel.de (Charles Reindorf)
  4. Subject: Re: Using 64k objects
  5. Message-ID: <1992Nov10.102746.12514@us-es.sel.de>
  6. Sender: news@us-es.sel.de
  7. Organization: SEL-Alcatel Line Transmission Systems Dept. US/ES
  8. References: <1992Nov4.011604.5884@piccolo.cit.cornell.edu> <BxH4p6.8Bn@research.canon.oz.au>
  9. Date: Tue, 10 Nov 92 10:27:46 GMT
  10. Lines: 28
  11.  
  12. In article <BxH4p6.8Bn@research.canon.oz.au>, colin@cole.research.canon.oz.au (Colin Pickup) writes:
  13. |> In article <1992Nov4.011604.5884@piccolo.cit.cornell.edu>  
  14. |> sl14@crux3.cit.cornell.edu (Stephen Lee) writes:
  15. |> > [ etc ]
  16. |> 
  17. |> Borland is one of the few C/C++ compilers that handles arrays bigger that  
  18. |> 64K. To do it either use the huge memory model for the whole program or  
  19. |> just make the pointers to the arrays huge (read the manuals on how to do  
  20. |> this). The second option will give better run-time performance.
  21.  
  22. Is it not the case that the "huge" memory model does not imply huge pointers by default?
  23. According to my understanding of the "huge" memory model, the only difference between it and
  24. large memory models is that a separate data area is allocated for statics, string literals,
  25. e.t.c. per translation unit rather than for the entire program. The "huge" as applies to
  26. memory models versus the "huge" as applies to pointers would seem to have a subtle difference
  27. here. If you wish to allocate and manipulate huge arrays, I believe you have to explicitly
  28. use "huge" pointers.
  29.  
  30. |> NOTE : you can not use new to allocate arrays bigger than 64K. The size  
  31. |> parameter for new is a unsigned, i.e. 16 bits. You must use hugealloc and  
  32. |> hugefree (again look in the manual for these functions).
  33. |> Colin Pickup
  34. |> 
  35.  
  36.  
  37. All opinions above are my own etc.
  38.  
  39. -- Charles Reindorf
  40.