On Sun, Jul 21, 2019 at 7:29 AM Paul Eggert wrote: > > I think we have the following options: > > > > 1. remove pure space entirely > > 2. remove pure space, but leave PURE_P and CHECK_IMPURE as reminders > > to do something about it. > > 3. move pure space to BSS > > 4. xmalloc() pure space, only when needed > > 5. modify pdumper to mark and recognize pure objects > > 6. do nothing and accept the wastefulness > > I suggest (1), since it will result in simpler code. I think we should do (1) for now, since it simplifies the code enough to introduce immutable objects "soon"; but until that time, we waste more space on duplicate objects that we no longer know to be immutable, so cannot merge. I'm attaching a first patch that removes pure space, pinned symbols, pinned objects, but keeps Fpurecopy (for hash consing), and doesn't touch the Lisp codebase. With this patch, I have: -rw-r--r-- 2 pip pip 11102752 Jul 21 12:28 src/emacs.pdmp before: -rw-r--r-- 2 pip pip 10381464 Jul 21 12:29 src/emacs.pdmp However, the (uncompressed) disk space requirement is about the same, since the emacs binary is a lot smaller. I think the next steps are to look at actual live memory usage (which will increase due to the non-duplication of objects, but not by an entire megabyte because some of that data is relocations), and GC performance (no prediction here, it could improve or deteriorate).