Mercurial > emacs
comparison src/alloc.c @ 590:1a6483439acc
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Fri, 20 Mar 1992 06:01:16 +0000 |
parents | 8c615e453683 |
children | a8d78999e46d |
comparison
equal
deleted
inserted
replaced
589:03fd51103bc3 | 590:1a6483439acc |
---|---|
1 /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
2 Copyright (C) 1985, 1986, 1988 Free Software Foundation, Inc. | 2 Copyright (C) 1985, 1986, 1988, 1992 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GNU Emacs. | 4 This file is part of GNU Emacs. |
5 | 5 |
6 GNU Emacs is free software; you can redistribute it and/or modify | 6 GNU Emacs is free software; you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
161 long *block; | 161 long *block; |
162 int size; | 162 int size; |
163 { | 163 { |
164 register long *val; | 164 register long *val; |
165 | 165 |
166 val = (long *) realloc (block, size); | 166 /* We must call malloc explicitly when BLOCK is 0, since some |
167 reallocs don't do this. */ | |
168 if (! block) | |
169 val = (long *) malloc (size); | |
170 ese | |
171 val = (long *) realloc (block, size); | |
167 | 172 |
168 if (!val && size) memory_full (); | 173 if (!val && size) memory_full (); |
169 return val; | 174 return val; |
170 } | 175 } |
171 | 176 |