diff src/mc-alloc.h @ 3303:619edf713d55

[xemacs-hg @ 2006-03-26 14:05:29 by crestani] 2006-03-21 Marcus Crestani <crestani@xemacs.org> * mc-alloc.c (visit_all_used_page_headers): * mc-alloc.c (finalize_page_for_disksave): * mc-alloc.c (mc_finalize_for_disksave): * mc-alloc.c (sweep_page): * mc-alloc.c (mc_sweep): * mc-alloc.c (protect_heap_page): * mc-alloc.c (protect_heap_pages): * mc-alloc.c (unprotect_heap_page): * mc-alloc.c (unprotect_heap_pages): * mc-alloc.h: Return number of pages processed. * vdb.c (vdb_start_dirty_bits_recording): Adjust size of page_fault_table to its upper bound (= number of pages that contain BLACK objects) in advance, to avoid malloc in the signal handler.
author crestani
date Sun, 26 Mar 2006 14:05:30 +0000
parents d674024a8674
children 1043bbfa24cf
line wrap: on
line diff
--- a/src/mc-alloc.h	Sun Mar 26 13:05:17 2006 +0000
+++ b/src/mc-alloc.h	Sun Mar 26 14:05:30 2006 +0000
@@ -105,11 +105,12 @@
 
 /* The finalizer of every not marked object is called.  The macro
    MC_ALLOC_CALL_FINALIZER has to be defined and call the finalizer of
-   the object. */
-void mc_finalize (void);
+   the object.  Returns number of processed pages. */
+EMACS_INT mc_finalize (void);
 
-/* All not marked objects of the used heap are freed. */
-void mc_sweep (void);
+/* All not marked objects of the used heap are freed.  Returns number
+   of processed pages. */
+EMACS_INT mc_sweep (void);
 
 
 
@@ -117,8 +118,9 @@
 
 /* The finalizer for disksave of every object is called to shrink the
    dump image.  The macro MC_ALLOC_CALL_FINALIZER_FOR_DISKSAVE has to
-   be defined and call the finalizer for disksave of the object. */
-void mc_finalize_for_disksave (void);
+   be defined and call the finalizer for disksave of the object.
+   Returns number of processed pages. */
+EMACS_INT mc_finalize_for_disksave (void);
 
 
 
@@ -141,12 +143,13 @@
 /* Is the fault at ptr on a protected page? */
 EMACS_INT fault_on_protected_page (void *ptr);
 
-/* Remove protection (if there) of heap page of given page header
-   ph. */
-void protect_heap_pages (void);
+/* Remove protection (if there) of heap page of given page header ph.
+   Returns number of processed pages. */
+EMACS_INT protect_heap_pages (void);
 
-/* Remove protection for all heap pages which are protected. */
-void unprotect_heap_pages (void);
+/* Remove protection for all heap pages which are protected.  Returns
+   number of processed pages. */
+EMACS_INT unprotect_heap_pages (void);
 
 /* Remove protection and mark page dirty. */
 void unprotect_page_and_mark_dirty (void *ptr);