home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / std / c / 3039 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.2 KB  |  70 lines

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!crowded-house!richard
  3. From: richard@crowded-house.den.mmc.com (Richard Armstrong)
  4. Subject: Memory Usage by C
  5. Message-ID: <1992Nov19.190526.26770@den.mmc.com>
  6. Sender: news@den.mmc.com (News)
  7. Nntp-Posting-Host: crowded-house.den.mmc.com
  8. Organization: Martin Marietta
  9. Date: Thu, 19 Nov 1992 19:05:26 GMT
  10. Lines: 58
  11.  
  12. From news.den.mmc.com!crowded-house!richard Thu Nov 19 12:03:52 MST 1992
  13. Article: 20542 of comp.lang.c
  14. Newsgroups: comp.lang.c
  15. Path: news.den.mmc.com!crowded-house!richard
  16. From: richard@crowded-house.den.mmc.com (Richard Armstrong)
  17. Subject: Re: Where are literals stored?
  18. Message-ID: <1992Nov19.185712.25971@den.mmc.com>
  19. Sender: news@den.mmc.com (News)
  20. Nntp-Posting-Host: crowded-house.den.mmc.com
  21. Organization: Martin Marietta
  22. References: <1992Nov18.233739.2335@den.mmc.com>
  23. Date: Thu, 19 Nov 1992 18:57:12 GMT
  24. Lines: 37
  25.  
  26. In article <1992Nov18.233739.2335@den.mmc.com> richard@crowded-house.den.mmc.com (Richard Armstrong) writes:
  27. >Are literals always stored in the same location in memory? (IBM-PC,Borland)
  28. >
  29. >For instance, is the string a stored in the same place in the following
  30. >two declarations?:
  31. >
  32. >static char *a[]="ABC"
  33. >funca()
  34. >{
  35. >}
  36. >
  37. >funca()
  38. >{
  39. >char *a[]="ABC";
  40. >}
  41. >
  42.  
  43. The lack of response on this issue has prompted me to supply more information.
  44.  
  45. We have an application that is running out of heap and stack space.  We are
  46. trying to figure out if the above declarations store the literal strings in
  47. the same place, and if that is the case, we will not bother changing the way
  48. we declare these strings.  If anyone has any suggestions on moving memory
  49. around so that heap and stack are not compromised, then please let me know.
  50.  
  51. The current environment is Borland C++ on PC's.  We can also use Microsoft C++
  52. 7.0.
  53.  
  54. Thanks in advance.
  55.  
  56.  
  57.  
  58. -- 
  59. My company never said any of this... I didn't either.
  60. Richard Armstrong, Software Engineer, Martin Marietta
  61. Email->>>> richard@crowded-house.den.mmc.com <<<<-Email 
  62.  
  63.  
  64.  
  65. -- 
  66. My company never said any of this... I didn't either.
  67. Richard Armstrong, Software Engineer, Martin Marietta
  68. Email->>>> richard@crowded-house.den.mmc.com <<<<-Email 
  69.  
  70.