summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/loadup.el11
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 56127c0f504..d6de8167231 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2010-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
+ * loadup.el: Setup hash-cons for pure data.
+
Fix duplicate entries in cedet's loaddefs.el files.
* emacs-lisp/autoload.el (autoload-file-load-name): Be more clever.
Should make most file-local generated-autoload-file unnecessary.
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 85222ce7d9e..95af8cdb47e 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -64,6 +64,10 @@
(expand-file-name "international" dir)
(expand-file-name "textmodes" dir)))))
+(if (eq t purify-flag)
+ ;; Hash consing saved around 11% of pure space in my tests.
+ (setq purify-flag (make-hash-table :test 'equal)))
+
(message "Using load-path %s" load-path)
(if (or (member (nth 3 command-line-args) '("dump" "bootstrap"))
@@ -345,6 +349,10 @@
;; At this point, we're ready to resume undo recording for scratch.
(buffer-enable-undo "*scratch*")
+;; Avoid error if user loads some more libraries now and make sure the
+;; hash-consing hash table is GC'd.
+(setq purify-flag nil)
+
(if (null (garbage-collect))
(setq pure-space-overflow t))
@@ -378,9 +386,6 @@
(add-name-to-file "emacs" name t)))
(kill-emacs)))
-;; Avoid error if user loads some more libraries now.
-(setq purify-flag nil)
-
;; For machines with CANNOT_DUMP defined in config.h,
;; this file must be loaded each time Emacs is run.
;; So run the startup code now. First, remove `-l loadup' from args.