home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / ibm / pc / programm / 378 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  2.2 KB

  1. Xref: sparky comp.sys.ibm.pc.programmer:378 comp.os.msdos.programmer:9084
  2. Newsgroups: comp.sys.ibm.pc.programmer,comp.os.msdos.programmer
  3. Path: sparky!uunet!sequent!muncher.sequent.com!furballs
  4. From: furballs@sequent.com (Paul Penrod)
  5. Subject: Re: Group DGROUP exceeds 64K
  6. Message-ID: <1992Sep5.180634.3637@sequent.com>
  7. Sender: usenet@sequent.com (usenet )
  8. Nntp-Posting-Host: crg8.sequent.com
  9. Organization: Sequent Computer Systems Inc.
  10. References: <1992Sep4.213550.13151@pollux.lu.se> <rdippold.715665099@cancun>
  11. Date: Sat, 5 Sep 92 18:06:34 GMT
  12. Lines: 49
  13.  
  14. In article <rdippold.715665099@cancun> rdippold@cancun.qualcomm.com (Ron Dippold) writes:
  15. >lars_s@gemini.ldc.lu.se (Lars Sigebo) writes:
  16. >>I'm using Borland C++ version 3.0 in large memory model and are trying to 
  17. >>link a couple of modules. I got this message from TLINK:
  18. >
  19. >>     Error: Group DGROUP exceeds 64K
  20. >
  21. >Move your "static" declarations in functions out to the top level of
  22. >the file, from:
  23. >
  24. >main()
  25. >{
  26. >    static int big[30000];
  27. >    /* lotsa stuff */
  28. >}
  29. >
  30. >to 
  31. >
  32. >static int big[30000];
  33. >main()
  34. >{
  35. >    /* lotsa stuff */
  36. >}
  37. >
  38. >The same thing happens under Microsloth C.  Pain in the ass, and nasty
  39. >for scoping, but Intel real mode is Intel real mode...
  40. >-- 
  41. >Q: Why did the tachyon cross the road?  A: Because it was on the other side.
  42.  
  43. One other suggestion is to declare any large structures of arrays
  44. to be far. This will force them into their own data segment and
  45. allow the Large Model to link without incident. Under Large Model,
  46. far pointers are the rule, but they only operate 16 bit offsets, so
  47. the largest structure or declaration(s) you can have must not total
  48. more than 64K per segment . Also be aware that storage space is required for
  49. arrays and structures so you can not legally declare something
  50. like:
  51.  
  52. char foo[65535];
  53.  
  54. because of the storage space required to declare and utilize the
  55. array at runtime. If you need to have larger structures, then use
  56. Huge Model, which uses true 32 bit (normalized) pointers.
  57.  
  58. -- 
  59. --------------------------------------------------------------------
  60.             Bureaucracy: noun, plural - Bureaucracies.
  61.          The process of turning energy into solid waste.
  62. ---------------------------------------------------------------------
  63.