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