Mercurial > emacs
comparison src/alloc.c @ 20375:1dd0bd0749b5
(malloc_warning, display_malloc_warning): Return void.
(memory_full, free_cons, free_marker): Likewise.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Fri, 28 Nov 1997 14:32:30 +0000 |
parents | 612cd201aea5 |
children | d6605eeb5bd5 |
comparison
equal
deleted
inserted
replaced
20374:0b6c4f1041ae | 20375:1dd0bd0749b5 |
---|---|
202 write_string ("you should clean up, kill this Emacs, and start a new one.", -1); | 202 write_string ("you should clean up, kill this Emacs, and start a new one.", -1); |
203 return Qnil; | 203 return Qnil; |
204 } | 204 } |
205 | 205 |
206 /* malloc calls this if it finds we are near exhausting storage */ | 206 /* malloc calls this if it finds we are near exhausting storage */ |
207 | |
208 void | |
207 malloc_warning (str) | 209 malloc_warning (str) |
208 char *str; | 210 char *str; |
209 { | 211 { |
210 pending_malloc_warning = str; | 212 pending_malloc_warning = str; |
211 } | 213 } |
212 | 214 |
215 void | |
213 display_malloc_warning () | 216 display_malloc_warning () |
214 { | 217 { |
215 register Lisp_Object val; | 218 register Lisp_Object val; |
216 | 219 |
217 val = build_string (pending_malloc_warning); | 220 val = build_string (pending_malloc_warning); |
225 # define BYTES_USED _bytes_used | 228 # define BYTES_USED _bytes_used |
226 #endif | 229 #endif |
227 | 230 |
228 /* Called if malloc returns zero */ | 231 /* Called if malloc returns zero */ |
229 | 232 |
233 void | |
230 memory_full () | 234 memory_full () |
231 { | 235 { |
232 #ifndef SYSTEM_MALLOC | 236 #ifndef SYSTEM_MALLOC |
233 bytes_used_when_full = BYTES_USED; | 237 bytes_used_when_full = BYTES_USED; |
234 #endif | 238 #endif |
665 cons_block_index = 0; | 669 cons_block_index = 0; |
666 cons_free_list = 0; | 670 cons_free_list = 0; |
667 } | 671 } |
668 | 672 |
669 /* Explicitly free a cons cell. */ | 673 /* Explicitly free a cons cell. */ |
674 | |
675 void | |
670 free_cons (ptr) | 676 free_cons (ptr) |
671 struct Lisp_Cons *ptr; | 677 struct Lisp_Cons *ptr; |
672 { | 678 { |
673 *(struct Lisp_Cons **)&ptr->cdr = cons_free_list; | 679 *(struct Lisp_Cons **)&ptr->cdr = cons_free_list; |
674 cons_free_list = ptr; | 680 cons_free_list = ptr; |
1043 return val; | 1049 return val; |
1044 } | 1050 } |
1045 | 1051 |
1046 /* Put MARKER back on the free list after using it temporarily. */ | 1052 /* Put MARKER back on the free list after using it temporarily. */ |
1047 | 1053 |
1054 void | |
1048 free_marker (marker) | 1055 free_marker (marker) |
1049 Lisp_Object marker; | 1056 Lisp_Object marker; |
1050 { | 1057 { |
1051 unchain_marker (marker); | 1058 unchain_marker (marker); |
1052 | 1059 |