CVS update by crestani xemacs/src, device-msw.c, frame-gtk.c,
mc-alloc.c ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Wed Aug 15 07:06:30 EDT 2007
User: crestani
Date: 07/08/15 13:06:30
Modified: xemacs/src ChangeLog buffer.c console-tty.c device-gtk.c
device-msw.c device-x.c dynarr.c elhash.c extents.c
frame-gtk.c frame-msw.c frame-x.c glyphs.c
mc-alloc.c mc-alloc.h objects-tty.c syntax.c vdb.c
Log:
2007-08-15 Marcus Crestani <crestani at xemacs.org>
* buffer.c (Fkill_buffer):
* console-tty.c (free_tty_console_struct):
* device-gtk.c (free_gtk_device_struct):
* device-msw.c (mswindows_delete_device):
* device-msw.c (msprinter_delete_device):
* device-x.c (free_x_device_struct):
* device-x.c (x_delete_device):
* dynarr.c (Dynarr_lisp_realloc):
* dynarr.c (Dynarr_free):
* elhash.c:
* elhash.c (finalize_hash_table):
* elhash.c (resize_hash_table):
* elhash.c (pdump_reorganize_hash_table):
* extents.c (gap_array_delete_marker):
* frame-gtk.c (gtk_delete_frame):
* frame-msw.c (mswindows_delete_frame):
* frame-x.c (x_delete_frame):
* glyphs.c (check_for_ignored_expose):
* mc-alloc.c (mc_realloc_1):
* mc-alloc.h:
* objects-tty.c (tty_finalize_color_instance):
* objects-tty.c (tty_finalize_font_instance):
* objects-tty.c (console_type_create_objects_tty):
* syntax.c:
* syntax.c (uninit_buffer_syntax_cache):
* vdb.c (Ftest_vdb): Remove all calls to mc_free.
Revision Changes Path
1.1084 +29 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.1083
retrieving revision 1.1084
diff -u -p -r1.1083 -r1.1084
--- ChangeLog 2007/08/14 18:58:13 1.1083
+++ ChangeLog 2007/08/15 11:06:02 1.1084
@@ -1,3 +1,32 @@
+2007-08-15 Marcus Crestani <crestani at xemacs.org>
+
+ * buffer.c (Fkill_buffer):
+ * console-tty.c (free_tty_console_struct):
+ * device-gtk.c (free_gtk_device_struct):
+ * device-msw.c (mswindows_delete_device):
+ * device-msw.c (msprinter_delete_device):
+ * device-x.c (free_x_device_struct):
+ * device-x.c (x_delete_device):
+ * dynarr.c (Dynarr_lisp_realloc):
+ * dynarr.c (Dynarr_free):
+ * elhash.c:
+ * elhash.c (finalize_hash_table):
+ * elhash.c (resize_hash_table):
+ * elhash.c (pdump_reorganize_hash_table):
+ * extents.c (gap_array_delete_marker):
+ * frame-gtk.c (gtk_delete_frame):
+ * frame-msw.c (mswindows_delete_frame):
+ * frame-x.c (x_delete_frame):
+ * glyphs.c (check_for_ignored_expose):
+ * mc-alloc.c (mc_realloc_1):
+ * mc-alloc.h:
+ * objects-tty.c (tty_finalize_color_instance):
+ * objects-tty.c (tty_finalize_font_instance):
+ * objects-tty.c (console_type_create_objects_tty):
+ * syntax.c:
+ * syntax.c (uninit_buffer_syntax_cache):
+ * vdb.c (Ftest_vdb): Remove all calls to mc_free.
+
2006-12-29 Nix <nix at esperi.org.uk>
* gc.c (recompute_need_to_garbage_collect): Avoid numeric
1.78 +2 -0 XEmacs/xemacs/src/buffer.c
Index: buffer.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/buffer.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -p -r1.77 -r1.78
--- buffer.c 2006/11/22 02:20:34 1.77
+++ buffer.c 2007/08/15 11:06:06 1.78
@@ -1348,7 +1348,9 @@ with `delete-process'.
}
uninit_buffer_markers (b);
+#ifndef NEW_GC
uninit_buffer_syntax_cache (b);
+#endif /* not NEW_GC */
kill_buffer_local_variables (b);
1.36 +1 -3 XEmacs/xemacs/src/console-tty.c
Index: console-tty.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-tty.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- console-tty.c 2006/08/24 21:21:36 1.35
+++ console-tty.c 2007/08/15 11:06:07 1.36
@@ -219,9 +219,7 @@ free_tty_console_struct (struct console
xfree (tty_con->term_entry_buffer, char *);
tty_con->term_entry_buffer = NULL;
}
-#ifdef NEW_GC
- mc_free (tty_con);
-#else /* not NEW_GC */
+#ifndef NEW_GC
xfree (tty_con, struct tty_console *);
#endif /* not NEW_GC */
CONSOLE_TTY_DATA (con) = NULL;
1.17 +2 -4 XEmacs/xemacs/src/device-gtk.c
Index: device-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-gtk.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -r1.16 -r1.17
--- device-gtk.c 2005/11/25 01:41:58 1.16
+++ device-gtk.c 2007/08/15 11:06:07 1.17
@@ -359,15 +359,13 @@ gtk_mark_device (struct device *d)
/* closing an X connection */
/************************************************************************/
+#ifndef NEW_GC
static void
free_gtk_device_struct (struct device *d)
{
-#ifdef NEW_GC
- mc_free (d->device_data);
-#else /* not NEW_GC */
xfree (d->device_data, void *);
-#endif /* not NEW_GC */
}
+#endif /* not NEW_GC */
static void
gtk_delete_device (struct device *d)
1.61 +2 -6 XEmacs/xemacs/src/device-msw.c
Index: device-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-msw.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -p -r1.60 -r1.61
--- device-msw.c 2005/11/25 01:41:58 1.60
+++ device-msw.c 2007/08/15 11:06:07 1.61
@@ -300,9 +300,7 @@ mswindows_delete_device (struct device *
#endif
DeleteDC (DEVICE_MSWINDOWS_HCDC (d));
-#ifdef NEW_GC
- mc_free (d->device_data);
-#else /* not NEW_GC */
+#ifndef NEW_GC
xfree (d->device_data, void *);
#endif /* not NEW_GC */
}
@@ -576,9 +574,7 @@ msprinter_delete_device (struct device *
DEVICE_MSPRINTER_DEVMODE (d) = Qnil;
}
-#ifdef NEW_GC
- mc_free (d->device_data);
-#else /* not NEW_GC */
+#ifndef NEW_GC
xfree (d->device_data, void *);
#endif /* not NEW_GC */
}
1.70 +4 -4 XEmacs/xemacs/src/device-x.c
Index: device-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-x.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -p -r1.69 -r1.70
--- device-x.c 2006/11/28 21:20:37 1.69
+++ device-x.c 2007/08/15 11:06:07 1.70
@@ -939,15 +939,13 @@ x_mark_device (struct device *d)
/* closing an X connection */
/************************************************************************/
+#ifndef NEW_GC
static void
free_x_device_struct (struct device *d)
{
-#ifdef NEW_GC
- mc_free (d->device_data);
-#else /* not NEW_GC */
xfree (d->device_data, void *);
-#endif /* not NEW_GC */
}
+#endif /* not NEW_GC */
static void
x_delete_device (struct device *d)
@@ -990,7 +988,9 @@ x_delete_device (struct device *d)
#endif
}
+#ifndef NEW_GC
free_x_device_struct (d);
+#endif /* not NEW_GC */
}
1.16 +2 -9 XEmacs/xemacs/src/dynarr.c
Index: dynarr.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dynarr.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- dynarr.c 2006/03/20 21:20:28 1.15
+++ dynarr.c 2007/08/15 11:06:07 1.16
@@ -162,13 +162,10 @@ static void
Dynarr_lisp_realloc (Dynarr *dy, int new_size)
{
void *new_base = alloc_lrecord_array (dy->elsize, new_size, dy->lisp_imp);
- void *old_base = dy->base;
if (dy->base)
memcpy (new_base, dy->base,
(dy->max < new_size ? dy->max : new_size) * dy->elsize);
dy->base = new_base;
- if (old_base)
- mc_free (old_base);
}
void *
@@ -266,16 +263,12 @@ Dynarr_free (void *d)
#ifdef NEW_GC
if (dy->base && !DUMPEDP (dy->base))
{
- if (dy->lisp_imp)
- mc_free (dy->base);
- else
+ if (!dy->lisp_imp)
xfree (dy->base, void *);
}
if(!DUMPEDP (dy))
{
- if (dy->lisp_imp)
- mc_free (dy);
- else
+ if (!dy->lisp_imp)
xfree (dy, Dynarr *);
}
#else /* not NEW_GC */
1.47 +7 -21 XEmacs/xemacs/src/elhash.c
Index: elhash.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/elhash.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -p -r1.46 -r1.47
--- elhash.c 2007/07/22 22:04:12 1.46
+++ elhash.c 2007/08/15 11:06:08 1.47
@@ -398,28 +398,16 @@ print_hash_table (Lisp_Object obj, Lisp_
write_fmt_string (printcharfun, " 0x%x>", ht->header.uid);
}
+#ifndef NEW_GC
static void
-free_hentries (
-#if defined (NEW_GC) && !defined (ERROR_CHECK_STRUCTURES)
- htentry *UNUSED (hentries),
-#else
- htentry *hentries,
-#endif
+free_hentries (htentry *hentries,
#ifdef ERROR_CHECK_STRUCTURES
size_t size
-#else /* not (NEW_GC && ! ERROR_CHECK_STRUCTURES) */
+#else /* not ERROR_CHECK_STRUCTURES) */
size_t UNUSED (size)
-#endif /* not (NEW_GC && ! ERROR_CHECK_STRUCTURES) */
+#endif /* not ERROR_CHECK_STRUCTURES) */
)
{
-#ifdef NEW_GC
-#ifdef ERROR_CHECK_STRUCTURES
- htentry *e, *sentinel;
-
- for (e = hentries, sentinel = e + size; e < sentinel; e++)
- mc_free (e);
-#endif
-#else /* not NEW_GC */
#ifdef ERROR_CHECK_STRUCTURES
/* Ensure a crash if other code uses the discarded entries afterwards. */
htentry *e, *sentinel;
@@ -430,10 +418,8 @@ free_hentries (
if (!DUMPEDP (hentries))
xfree (hentries, htentry *);
-#endif /* not NEW_GC */
}
-#ifndef NEW_GC
static void
finalize_hash_table (void *header, int for_disksave)
{
@@ -1071,7 +1057,9 @@ resize_hash_table (Lisp_Hash_Table *ht,
*probe = *e;
}
+#ifndef NEW_GC
free_hentries (old_entries, old_size);
+#endif /* not NEW_GC */
}
/* After a hash table has been saved to disk and later restored by the
@@ -1101,9 +1089,7 @@ pdump_reorganize_hash_table (Lisp_Object
memcpy (ht->hentries, new_entries, ht->size * sizeof (htentry));
-#ifdef NEW_GC
- mc_free (new_entries);
-#else /* not NEW_GC */
+#ifndef NEW_GC
xfree (new_entries, htentry *);
#endif /* not NEW_GC */
}
1.67 +1 -3 XEmacs/xemacs/src/extents.c
Index: extents.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/extents.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -p -r1.66 -r1.67
--- extents.c 2006/06/21 17:30:36 1.66
+++ extents.c 2007/08/15 11:06:08 1.67
@@ -720,9 +720,7 @@ gap_array_delete_marker (Gap_Array *ga,
prev->next = p->next;
else
ga->markers = p->next;
-#ifdef NEW_GC
- mc_free (m);
-#else /* not NEW_GC */
+#ifndef NEW_GC
m->next = gap_array_marker_freelist;
m->pos = 0xDEADBEEF; /* -559038737 base 10 */
gap_array_marker_freelist = m;
1.24 +1 -3 XEmacs/xemacs/src/frame-gtk.c
Index: frame-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-gtk.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- frame-gtk.c 2006/11/12 13:40:08 1.23
+++ frame-gtk.c 2007/08/15 11:06:09 1.24
@@ -1354,9 +1354,7 @@ gtk_delete_frame (struct frame *f)
if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f))
xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f), char *);
-#ifdef NEW_GC
- mc_free (f->frame_data);
-#else /* not NEW_GC */
+#ifndef NEW_GC
xfree (f->frame_data, void *);
#endif /* not NEW_GC */
f->frame_data = 0;
1.60 +1 -3 XEmacs/xemacs/src/frame-msw.c
Index: frame-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-msw.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -p -r1.59 -r1.60
--- frame-msw.c 2005/11/25 01:42:02 1.59
+++ frame-msw.c 2007/08/15 11:06:09 1.60
@@ -353,9 +353,7 @@ mswindows_delete_frame (struct frame *f)
#endif
ReleaseDC (FRAME_MSWINDOWS_HANDLE (f), FRAME_MSWINDOWS_DC (f));
DestroyWindow (FRAME_MSWINDOWS_HANDLE (f));
-#ifdef NEW_GC
- mc_free (f->frame_data);
-#else /* not NEW_GC */
+#ifndef NEW_GC
xfree (f->frame_data, void *);
#endif /* not NEW_GC */
}
1.77 +1 -3 XEmacs/xemacs/src/frame-x.c
Index: frame-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-x.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- frame-x.c 2006/11/12 13:40:08 1.76
+++ frame-x.c 2007/08/15 11:06:09 1.77
@@ -2686,9 +2686,7 @@ x_delete_frame (struct frame *f)
if (f->frame_data)
{
-#ifdef NEW_GC
- mc_free (f->frame_data);
-#else /* not NEW_GC */
+#ifndef NEW_GC
xfree (f->frame_data, void *);
#endif /* not NEW_GC */
f->frame_data = 0;
1.56 +1 -3 XEmacs/xemacs/src/glyphs.c
Index: glyphs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- glyphs.c 2005/11/25 01:42:04 1.55
+++ glyphs.c 2007/08/15 11:06:09 1.56
@@ -4576,9 +4576,7 @@ check_for_ignored_expose (struct frame*
if (ei == f->subwindow_exposures_tail)
f->subwindow_exposures_tail = prev;
-#ifdef NEW_GC
- mc_free (ei);
-#else /* not NEW_GC */
+#ifndef NEW_GC
Blocktype_free (the_expose_ignore_blocktype, ei);
#endif /* not NEW_GC */
return 1;
1.11 +0 -11 XEmacs/xemacs/src/mc-alloc.c
Index: mc-alloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mc-alloc.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- mc-alloc.c 2006/03/26 15:24:26 1.10
+++ mc-alloc.c 2007/08/15 11:06:10 1.11
@@ -1576,15 +1576,6 @@ mc_sweep (void)
}
-/* Frees the cell pointed to by ptr. */
-void
-mc_free (void *UNUSED (ptr))
-{
- /* Manual frees are not allowed with asynchronous finalization */
- return;
-}
-
-
/* Changes the size of the cell pointed to by ptr.
Returns the new address of the new cell with new size. */
void *
@@ -1603,12 +1594,10 @@ mc_realloc_1 (void *ptr, size_t size, in
#ifdef ALLOC_TYPE_STATS
inc_lrecord_stats (size, (struct lrecord_header *) result);
#endif /* not ALLOC_TYPE_STATS */
- /* mc_free (ptr); not needed, will be collected next gc */
return result;
}
else
{
- /* mc_free (ptr); not needed, will be collected next gc */
return 0;
}
}
1.7 +0 -6 XEmacs/xemacs/src/mc-alloc.h
Index: mc-alloc.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mc-alloc.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- mc-alloc.h 2006/03/26 15:24:27 1.6
+++ mc-alloc.h 2007/08/15 11:06:10 1.7
@@ -49,12 +49,6 @@ void *mc_alloc (size_t size);
dynamic arrays use this function. */
void *mc_alloc_array (size_t size, EMACS_INT elemcount);
-/* Free the object pointed to by ptr and make its memory re-usable
- again. The memory must have been returned by a previous call to
- mc_alloc(). This can be used to free memory explicitly, outside a
- garbage collection. */
-void mc_free (void *ptr);
-
/* Modify the size of the memory block pointed to by ptr. Return the
address of the new block of given size. The content of the memory
block will be unchanged to the minimum of the old and new sizes: if
1.20 +8 -8 XEmacs/xemacs/src/objects-tty.c
Index: objects-tty.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-tty.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- objects-tty.c 2007/02/22 16:19:44 1.19
+++ objects-tty.c 2007/08/15 11:06:10 1.20
@@ -218,16 +218,14 @@ tty_print_color_instance (Lisp_Color_Ins
{
}
+#ifndef NEW_GC
static void
tty_finalize_color_instance (Lisp_Color_Instance *c)
{
if (c->data)
-#ifdef NEW_GC
- mc_free (c->data);
-#else /* not NEW_GC */
xfree (c->data, void *);
-#endif /* not NEW_GC */
}
+#endif /* not NEW_GC */
static int
tty_color_instance_equal (Lisp_Color_Instance *c1,
@@ -315,16 +313,14 @@ tty_print_font_instance (Lisp_Font_Insta
{
}
+#ifndef NEW_GC
static void
tty_finalize_font_instance (Lisp_Font_Instance *f)
{
if (f->data)
-#ifdef NEW_GC
- mc_free (f->data);
-#else /* not NEW_GC */
xfree (f->data, void *);
-#endif /* not NEW_GC */
}
+#endif /* not NEW_GC */
static Lisp_Object
tty_font_list (Lisp_Object UNUSED (pattern), Lisp_Object UNUSED (device),
@@ -421,7 +417,9 @@ console_type_create_objects_tty (void)
CONSOLE_HAS_METHOD (tty, initialize_color_instance);
CONSOLE_HAS_METHOD (tty, mark_color_instance);
CONSOLE_HAS_METHOD (tty, print_color_instance);
+#ifndef NEW_GC
CONSOLE_HAS_METHOD (tty, finalize_color_instance);
+#endif /* not NEW_GC */
CONSOLE_HAS_METHOD (tty, color_instance_equal);
CONSOLE_HAS_METHOD (tty, color_instance_hash);
CONSOLE_HAS_METHOD (tty, valid_color_name_p);
@@ -430,7 +428,9 @@ console_type_create_objects_tty (void)
CONSOLE_HAS_METHOD (tty, initialize_font_instance);
CONSOLE_HAS_METHOD (tty, mark_font_instance);
CONSOLE_HAS_METHOD (tty, print_font_instance);
+#ifndef NEW_GC
CONSOLE_HAS_METHOD (tty, finalize_font_instance);
+#endif /* not NEW_GC */
CONSOLE_HAS_METHOD (tty, font_list);
#ifdef MULE
CONSOLE_HAS_METHOD (tty, font_spec_matches_charset);
1.32 +2 -4 XEmacs/xemacs/src/syntax.c
Index: syntax.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/syntax.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- syntax.c 2006/08/23 19:57:50 1.31
+++ syntax.c 2007/08/15 11:06:10 1.32
@@ -537,18 +537,16 @@ init_buffer_syntax_cache (struct buffer
reset_buffer_syntax_cache_range (cache, cache->object, 0);
}
+#ifndef NEW_GC
/* finalize the syntax cache for BUF */
void
uninit_buffer_syntax_cache (struct buffer *buf)
{
-#ifdef NEW_GC
- mc_free (buf->syntax_cache);
-#else /* not NEW_GC */
xfree (buf->syntax_cache, struct syntax_cache *);
-#endif /* not NEW_GC */
buf->syntax_cache = 0;
}
+#endif /* not NEW_GC */
/* extent-specific APIs used in extents.c and insdel.c */
1.3 +0 -1 XEmacs/xemacs/src/vdb.c
Index: vdb.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/vdb.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- vdb.c 2006/03/26 14:05:30 1.2
+++ vdb.c 2007/08/15 11:06:10 1.3
@@ -132,7 +132,6 @@ Test virtual dirty bit implementation. P
fprintf (stderr, "WRONG page fault at %x\n",
(int) Dynarr_at (page_fault_table, count - 1));
Dynarr_free (page_fault_table);
- mc_free (p);
return Qnil;
}
More information about the XEmacs-CVS
mailing list