home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / 19075 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.2 KB

  1. Path: sparky!uunet!spool.mu.edu!olivea!sgigate!odin!twilight!zola!anchor!olson
  2. From: olson@anchor.esd.sgi.com (Dave Olson)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: strange compiler behavior
  5. Message-ID: <v8go36g@zola.esd.sgi.com>
  6. Date: 23 Jan 93 21:58:30 GMT
  7. References: <1993Jan23.043404.20003@Princeton.EDU>
  8. Sender: news@zola.esd.sgi.com (Net News)
  9. Organization: Silicon Graphics, Inc.  Mountain View, CA
  10. Lines: 20
  11.  
  12. In <1993Jan23.043404.20003@Princeton.EDU> igor@fine.Princeton.EDU (Igor Rivin) writes:
  13. | Why is it that if you declare an uninitialized global array,
  14. | three times as much virtual space as necessary gets allocated?
  15. | Trivial example program:
  16. | #include <stdio.h>
  17. | char dog[100000];
  18.  
  19. It was a bug in the code that tried to align global arrays
  20. that were large on page boundaries.  You can defeat it (it
  21. was turned off in later compiler releases by default) by
  22. the -Xnobsschange ld option.  The reason for the page alignment
  23. is that can improve performance for some times of i/o, particularly
  24. raw and  networking.
  25. --
  26. Let no one tell me that silence gives consent,  |   Dave Olson
  27. because whoever is silent dissents.             |   Silicon Graphics, Inc.
  28.     Maria Isabel Barreno                        |   olson@sgi.com
  29.