home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / programm / 6552 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  2.0 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!dfv.rwth-aachen.de!sungate.fido.de!p1.hippo.fido.de!freax.fido.de!Roman_Grzondziel
  2. Date: Tue, 17 Nov 92 15:47:12 +0100
  3. From: Roman_Grzondziel@freax.fido.de (Roman Grzondziel)
  4. Subject: Re: OS/2 memory management (ARGH!)
  5. Message-ID: <1b9dd34a@p11.f9.n242.z2.fidonet.org>
  6. References: <36e11b99@panix.com>
  7. Newsgroups: comp.os.os2.programmer
  8. X-Comment-To: (Larry Salomon Jr.)
  9. Organization: High End Point: 
  10. Lines: 40
  11.  
  12. >> Another annoyance: my program is using the PM interface, starting some
  13. >> separate windowed and not-windowed threads... I am not using any
  14. >> dynamic memory functions (like malloc etc.). But still, after playing
  15. >> with it for a while, I'm getting errors like "Maximum heap size reached"!
  16. >> (from one of the debugging hooks in my code). Sometimes the application
  17. >> quits right after this warning. While clicking around, I keep repeating the
  18. >> same sequences that do *not* create any new memory objects nor any new
  19. >> items.
  20. >> After a while, the memory status display starts showing increasingly
  21. >> shrinking
  22. >> store. WHY?! But sometimes the error appears even before this happens!
  23. >> AAAAAAAAAARGH!
  24. LS>
  25. >> Can anybody give me a hint?! I would be *very* grateful for any help.
  26. >> I am getting crazy here searching for a (of course still possible)
  27. >> bug in my code and not being able to find anything wrong! HELP!
  28. LS>
  29. LS> Remember that there could be things going on under the covers.  For
  30. LS> example,
  31. LS> WinInitialize() calls DosR2StackRealloc() to increase the size of the ring
  32. LS> 2
  33. LS> stack (or it did in 1.x).  The memory loss (I'll leave *that* one alone)
  34. LS> could
  35. LS> be the result of something else you are doing.
  36.  
  37. FINALLY I have found the bug... One function in my program was calling
  38. WinGetPS() without WinReleasePS()... My fault! This kind of bugs is quite
  39. hard to find when code exceeds 5000 lines :)
  40.  
  41. Nevertheless, thank you for answering my mail!
  42.  
  43.  
  44.     adios
  45.  
  46.         Roman
  47.  
  48. 2:242/9.11@fido.org
  49. roman_grzondziel@freax.fido.de
  50.  
  51.  
  52.