Mercurial > emacs
changeset 59400:eeb8b96d077d
(mark_fringe_data): Declare extern.
(Fgarbage_collect): Call mark_fringe_data.
(overrun_check_free): Invalidate freed memory if
XMALLOC_CLEAR_FREE_MEMORY is defined.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Thu, 06 Jan 2005 22:02:32 +0000 |
parents | 643d850694b5 |
children | 8f5e8e079790 |
files | src/alloc.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alloc.c Thu Jan 06 22:01:38 2005 +0000 +++ b/src/alloc.c Thu Jan 06 22:02:32 2005 +0000 @@ -309,6 +309,7 @@ static void mark_face_cache P_ ((struct face_cache *)); #ifdef HAVE_WINDOW_SYSTEM +extern void mark_fringe_data P_ ((void)); static void mark_image P_ ((struct image *)); static void mark_image_cache P_ ((struct frame *)); #endif /* HAVE_WINDOW_SYSTEM */ @@ -704,9 +705,14 @@ val + osize, XMALLOC_OVERRUN_CHECK_SIZE)) abort (); +#ifdef XMALLOC_CLEAR_FREE_MEMORY + val -= XMALLOC_OVERRUN_CHECK_SIZE; + memset (val, 0xff, osize + XMALLOC_OVERRUN_CHECK_SIZE*2); +#else bzero (val + osize, XMALLOC_OVERRUN_CHECK_SIZE); val -= XMALLOC_OVERRUN_CHECK_SIZE; bzero (val, XMALLOC_OVERRUN_CHECK_SIZE); +#endif } free (val); @@ -4799,6 +4805,10 @@ } mark_backtrace (); +#ifdef HAVE_WINDOW_SYSTEM + mark_fringe_data (); +#endif + #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES mark_stack (); #endif