? src/ChangeLog.add Index: src/alloc.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/alloc.c,v retrieving revision 1.42.2.20 diff -u -r1.42.2.20 alloc.c --- alloc.c 1999/10/01 16:36:44 1.42.2.20 +++ alloc.c 1999/10/02 00:42:50 @@ -2421,7 +2421,7 @@ static int dumpstructidx; -/* Put an entry in staticvec, pointing at the variable whose address is given +/* Put an entry in dumpstructvec, pointing at the variable whose address is given */ void dumpstruct (void *varaddress, const struct struct_description *desc) @@ -2433,6 +2433,22 @@ dumpstructidx++; } +Lisp_Object *pdump_wirevec[200]; +static int pdump_wireidx; + +/* Put an entry in pdump_wirevec, pointing at the variable whose address is given + */ +void +pdump_wire (Lisp_Object *varaddress) +{ + if (pdump_wireidx >= countof (pdump_wirevec)) + /* #### This is now a dubious abort() since this routine may be called */ + /* by Lisp attempting to load a DLL. */ + abort (); + pdump_wirevec[pdump_wireidx++] = varaddress; +} + + /* Mark reference to a Lisp_Object. If the object referred to has not been seen yet, recursively mark all the references contained in it. */ @@ -3909,6 +3925,8 @@ staticidx_nodump = 0; dumpstructidx = 0; + pdump_wireidx = 0; + consing_since_gc = 0; #if 1 gc_cons_threshold = 500000; /* XEmacs change */ @@ -4107,6 +4125,7 @@ * - nb_structdmp*pair(void *, adr) for pointers to structures * - lrecord_implementations_table[] * - relocation table + * - wired variable address/value couples with the count preceding the list */ typedef struct { @@ -4718,19 +4737,20 @@ pdump_entry_list_elmt *elmt; reloc_table rt; - for (i=0; i<256; i++) { - elmt = pdump_object_table[i].list; - if(!elmt) - continue; - rt.desc = lrecord_implementations_table[i]->description; - rt.count = pdump_object_table[i].count; - write (pdump_fd, &rt, sizeof (rt)); - while (elmt) - { - EMACS_INT rdata = pdump_get_entry (XRECORD_LHEADER (elmt->obj))->save_offset; - write (pdump_fd, &rdata, sizeof (rdata)); - elmt = elmt->next; - } + for (i=0; i<256; i++) + { + elmt = pdump_object_table[i].list; + if(!elmt) + continue; + rt.desc = lrecord_implementations_table[i]->description; + rt.count = pdump_object_table[i].count; + write (pdump_fd, &rt, sizeof (rt)); + while (elmt) + { + EMACS_INT rdata = pdump_get_entry (XRECORD_LHEADER (elmt->obj))->save_offset; + write (pdump_fd, &rdata, sizeof (rdata)); + elmt = elmt->next; + } } for (i=0; isave_offset; + write (pdump_fd, &pdump_wirevec[i], sizeof (pdump_wirevec[i])); + write (pdump_fd, &obj, sizeof (obj)); + } +} + void pdump (void) { @@ -4787,6 +4823,8 @@ for (i=0; ivalue = Qt; /* Veritas aetera */ Vquit_flag = Qnil; + + pdump_wire (&Qnil); + pdump_wire (&Qunbound); } void