Previous: , Up: Dumping phase   [Contents][Index]


12.4.5 Pointers dumping

A bunch of tables needed to reassign properly the global pointers are then written. They are:

  1. the pdump_root_struct_ptrs dynarr
  2. the pdump_opaques dynarr
  3. a vector of all the offsets to the objects in the file that include a description (for faster relocation at reload time)
  4. the pdump_root_objects and pdump_weak_object_chains dynarrs.

For each of the dynarrs we write both the pointer to the variables and the relocated offset of the object they point to. Since these variables are global, the pointers are still valid when restarting the program and are used to regenerate the global pointers.

The pdump_weak_object_chains dynarr is a special case. The variables it points to are the head of weak linked lists of lisp objects of the same type. Not all objects of this list are dumped so the relocated pointer we associate with them points to the first dumped object of the list, or Qnil if none is available. This is also the reason why they are not used as roots for the purpose of object enumeration.

Some very important information like the staticpros and lrecord_implementations_table are handled indirectly using dump_add_opaque or dump_add_root_struct_ptr.

This is the end of the dumping part.