changeset 2965:0612d54a372a

[xemacs-hg @ 2005-09-30 02:15:06 by ben] fix --disable-debug error alloca.c: Don't declare a variable `register' when it can be passed to xfree(), which may take its address. new -> new_.
author ben
date Fri, 30 Sep 2005 02:15:08 +0000
parents bcbe7794aa6f
children ac5f15f09c38
files src/ChangeLog src/alloca.c
diffstat 2 files changed, 37 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Sep 29 21:51:08 2005 +0000
+++ b/src/ChangeLog	Fri Sep 30 02:15:08 2005 +0000
@@ -1,3 +1,33 @@
+2005-09-29  Ben Wing  <ben@xemacs.org>
+
+	* alloca.c (xemacs_c_alloca):
+	Don't declare a variable `register' when it can be passed to
+	xfree(), which may take its address.
+
+	new -> new_.
+
+2005-09-27  Ben Wing  <ben@xemacs.org>
+
+	* alloc.c (garbage_collect_1):
+	Avoid use of reserved C++ `catch'.
+	
+	* alloc.c:
+	* alloc.c (gc_plist_hack):
+	* alloc.c (HACK_O_MATIC):
+	* alloc.c (Fgarbage_collect):
+	* alloc.c (Ftotal_memory_usage):
+	* alloc.c (Flisp_object_memory_usage):
+	* alloc.c (recompute_need_to_garbage_collect):
+	* alloc.c (common_init_alloc_early):
+	* alloc.c (syms_of_alloc):
+	* alloc.c (vars_of_alloc):
+	Rename underused `memory-usage' to `total-memory-usage'.
+	Add `lisp-object-memory-usage'.  Reimplement `gc-cons-percentage'
+	to be a percentage of total Lisp object allocation (not total
+	memory of all sorts, which is hard to calculate in any case) and
+	give it a preliminary value of 40%.  Use EMACS_INT instead of
+	int in a couple of places.
+
 2005-09-26  Marcus Crestani  <crestani@xemacs.org>
 
 	* symbols.c (check_module_subr): Fix new allocator's module
--- a/src/alloca.c	Thu Sep 29 21:51:08 2005 +0000
+++ b/src/alloca.c	Fri Sep 30 02:15:08 2005 +0000
@@ -143,7 +143,7 @@
      was allocated from deeper in the stack than currently. */
 
   {
-    register header *hp;	/* Traverses linked list.  */
+    header *hp;	/* Traverses linked list.  */
 
     for (hp = last_alloca_header; hp != NULL;)
       if ((STACK_DIR > 0 && hp->h.deep > depth)
@@ -177,20 +177,20 @@
 
   {
 #ifdef emacs
-    register pointer new = xmalloc (sizeof (header) + size);
+    register pointer new_ = xmalloc (sizeof (header) + size);
 #else
-    register pointer new = malloc (sizeof (header) + size);
+    register pointer new_ = malloc (sizeof (header) + size);
 #endif
     /* Address of header.  */
 
-    ((header *) new)->h.next = last_alloca_header;
-    ((header *) new)->h.deep = depth;
+    ((header *) new_)->h.next = last_alloca_header;
+    ((header *) new_)->h.deep = depth;
 
-    last_alloca_header = (header *) new;
+    last_alloca_header = (header *) new_;
 
     /* User storage begins just after header.  */
 
-    return (pointer) ((char *) new + sizeof (header));
+    return (pointer) ((char *) new_ + sizeof (header));
   }
 }