home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / tcl / 1837 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  1.3 KB

  1. Path: sparky!uunet!news.centerline.com!noc.near.net!news.bbn.com!usc!rpi!psinntp!psinntp!bacon!yen!chris
  2. From: chris@yen.IMSI.COM (Chris Payne)
  3. Newsgroups: comp.lang.tcl
  4. Subject: Re: Dumping/Restoring Interpreter Memory
  5. Message-ID: <CHRIS.92Nov15202526@yen.IMSI.COM>
  6. Date: 16 Nov 92 01:25:26 GMT
  7. References: <1992Nov11.163524.12633@stortek.com> <BxLCJ1.Mw2@NeoSoft.com>
  8. Sender: news@bacon.IMSI.COM
  9. Distribution: usa
  10. Organization: Moore Capital Management
  11. Lines: 18
  12. In-reply-to: karl@NeoSoft.com's message of 12 Nov 92 06:54:30 GMT
  13. Originator: chris@yen
  14.  
  15.  
  16. gdb (version >= 4.7 if not earlier) does something like this.  It uses
  17. a new gnu malloc system which allows for multiple malloc pools -- the
  18. app can specify a pool when it calls malloc.  gdb uses a special pool
  19. for programs' symbol-tables which it can save as a disk file.  These
  20. files can be reloaded later by another instance of gdb.
  21.  
  22. The scheme uses mmap'd files for malloc arenas -- fast & popular these
  23. days, if your operating system provides it (sunOS, SGI's irix, sVr4...)
  24.  
  25. To make this work for Tcl, you'd have to grab the gnu package & then
  26. identify the malloc's for variables you want to save.  You might have
  27. to convert some [static] structures to live in the mmap'd area.  The
  28. reload won't be super-clean, either.
  29.  
  30. Good hunting.
  31.  
  32. /chris
  33.