[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dumper problems and a possible solutions
From: |
Rich Felker |
Subject: |
Re: Dumper problems and a possible solutions |
Date: |
Wed, 25 Jun 2014 14:08:23 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jun 25, 2014 at 10:03:36PM +0400, Dmitry Antipov wrote:
> On 06/24/2014 09:19 PM, Rich Felker wrote:
>
> >To solve ALL of the problems with the dumper (which seems to be a
> >recurring theme), I have a proposed design to make it fully portable
> >-- even moreso than xemacs "portable dumper" which is still an ugly
> >hack. The idea is simple: after loading all of the lisp objects that
> >need dumping, walk the lisp heap and output a representation for each
> >object as a giant static array in C source format, then compile and
> >link this new translation unit with the rest of the emacs .o files to
> >produce a final emacs binary.
>
> What about non-Lisp objects?
>
> It's not too hard to walk through live (reachable) Lisp objects - this
> is exactly what GC mark phase does. It's not too hard to walk through
> all allocated Lisp objects - this is exactly what GC sweep phase does.
> But what about lower-level stuff allocated with malloc at invisible
> from Lisp? Of course, you can do your own serialization for these objects
> as well - but only if you know about their internal structure. What about
> stuff allocated by some external library? In general, you can't parse heap
> (i.e. looking at object, you can't say where the next object is, what is the
> type of next object, etc.). IIUC, "totally portable" heap dumper is impossible
> without having a description of each possible heap object and ability to
> distinguish between different types of objects.
Are there such objects that need to be preserved across dumping? This
is a real question. I'm not familiar enough with emacs' internals to
know whether there are or not, but my impression is that emacs does
not need a fully general process-freeze-and-thaw dumper (in fact it
doesn't even try to be one), and my hope is that only the lisp state,
and perhaps some reasonably-trivial amount of non-lisp data with known
structure, actually needs to be preserved.
Can you or anyone else provide some answers to this question?
Rich
- Re: Dumper problems and a possible solutions, (continued)
- Re: Dumper problems and a possible solutions, Rich Felker, 2014/06/25
- Re: Dumper problems and a possible solutions, Dmitry Antipov, 2014/06/25
- Re: Dumper problems and a possible solutions, Rich Felker, 2014/06/26
- Re: Dumper problems and a possible solutions, Dmitry Antipov, 2014/06/26
- Re: Dumper problems and a possible solutions, Rich Felker, 2014/06/26
- Re: Dumper problems and a possible solutions, Eli Zaretskii, 2014/06/26
- Re: Dumper problems and a possible solutions, Rich Felker, 2014/06/26
- Re: Dumper problems and a possible solutions, Andreas Schwab, 2014/06/25
- Re: Dumper problems and a possible solutions, Samuel Bronson, 2014/06/25
- Re: Dumper problems and a possible solutions, Rich Felker, 2014/06/25
Re: Dumper problems and a possible solutions,
Rich Felker <=
Re: Dumper problems and a possible solutions, Eli Zaretskii, 2014/06/25
Re: Dumper problems and a possible solutions, Stephen J. Turnbull, 2014/06/25
Re: Dumper problems and a possible solutions, Stefan Monnier, 2014/06/25