comparison src/alloc.c @ 31892:2f3d88ac2b38

(__malloc_size_t) [DOUG_LEA_MALLOC]: Don't redefine it. (__malloc_size_t) [!DOUG_LEA_MALLOC]: Define unconditionally as size_t. (__malloc_extra_blocks): Declare as __malloc_size_t.
author Dave Love <fx@gnu.org>
date Mon, 25 Sep 2000 21:08:56 +0000
parents fb63b2aeedf0
children a292cc13911a
comparison
equal deleted inserted replaced
31891:d8d68cbd1113 31892:2f3d88ac2b38
50 #endif 50 #endif
51 51
52 #ifdef DOUG_LEA_MALLOC 52 #ifdef DOUG_LEA_MALLOC
53 53
54 #include <malloc.h> 54 #include <malloc.h>
55 /* malloc.h #defines this as size_t, at least in glibc2. */
56 #ifndef __malloc_size_t
55 #define __malloc_size_t int 57 #define __malloc_size_t int
58 #endif
56 59
57 /* Specify maximum number of areas to mmap. It would be nice to use a 60 /* Specify maximum number of areas to mmap. It would be nice to use a
58 value that explicitly means "no limit". */ 61 value that explicitly means "no limit". */
59 62
60 #define MMAP_MAX_AREAS 100000000 63 #define MMAP_MAX_AREAS 100000000
61 64
62 #else /* not DOUG_LEA_MALLOC */ 65 #else /* not DOUG_LEA_MALLOC */
63 66
64 /* The following come from gmalloc.c. */ 67 /* The following come from gmalloc.c. */
65 68
66 #if defined (STDC_HEADERS)
67 #include <stddef.h>
68 #define __malloc_size_t size_t 69 #define __malloc_size_t size_t
69 #else
70 #define __malloc_size_t unsigned int
71 #endif
72 extern __malloc_size_t _bytes_used; 70 extern __malloc_size_t _bytes_used;
73 extern int __malloc_extra_blocks; 71 extern __malloc_size_t __malloc_extra_blocks;
74 72
75 #endif /* not DOUG_LEA_MALLOC */ 73 #endif /* not DOUG_LEA_MALLOC */
76 74
77 #define max(A,B) ((A) > (B) ? (A) : (B)) 75 #define max(A,B) ((A) > (B) ? (A) : (B))
78 #define min(A,B) ((A) < (B) ? (A) : (B)) 76 #define min(A,B) ((A) < (B) ? (A) : (B))
3767 mark_image (img) 3765 mark_image (img)
3768 struct image *img; 3766 struct image *img;
3769 { 3767 {
3770 mark_object (&img->spec); 3768 mark_object (&img->spec);
3771 3769
3772 if (!GC_NILP (img->data.lisp_val)) 3770 if (!NILP (img->data.lisp_val))
3773 mark_object (&img->data.lisp_val); 3771 mark_object (&img->data.lisp_val);
3774 } 3772 }
3775 3773
3776 3774
3777 /* Mark Lisp objects in image cache of frame F. It's done this way so 3775 /* Mark Lisp objects in image cache of frame F. It's done this way so