home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13111 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.1 KB  |  30 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!usc!wupost!tulane!bourbon!he
  3. From: he@bourbon.ee.tulane.edu (Chuang He)
  4. Subject: malloc or new in C++
  5. Nntp-Posting-Host-[nntpd-21487]: bourbon
  6. Message-ID: <1992Aug31.194426.21549@cs.tulane.edu>
  7. Sender: news@cs.tulane.edu
  8. Organization: E.E. Dept., Tulane University, New Orleans, LA
  9. Distribution: usa
  10. Date: Mon, 31 Aug 1992 19:44:26 GMT
  11. Lines: 17
  12.  
  13.  
  14. I have written a program by using C++. The compiler is Sun C++ 2.1. I find a
  15. very interesting thing. I find two structure pointer set by malloc or new have
  16. the same address. That means if I change the content of one pointer pointing to
  17. will also change the other's. But these two pointers are unrelated. I don't know
  18. why. Does this mean that I use too much new or malloc that no more memory I can 
  19. use? Could anyone tell me about how many memories can one program use, I mean
  20. use by new or malloc. My machine is Sparcsation-SLC. The system is SunOS 4.1.1.
  21. It would be appreciated that someone can tell me the reason and the solution.
  22.  
  23.  
  24. Please send me an email. I do not read this newsgroup quite often.
  25.  
  26. he@bourbon.ee.tulane.edu
  27.  
  28.  
  29. -Chuang
  30.