diff options
| author | Jim Blandy | 1992-08-19 06:36:35 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-08-19 06:36:35 +0000 |
| commit | 8c7f1e3596d1e4a52598392fbd78458f70bcb2c3 (patch) | |
| tree | 342275eaf0779057e5ffff8af0408d2e36f81b9c /src/ralloc.c | |
| parent | 0ad77c5462a616798329b28a38eeecf08e8f7573 (diff) | |
| download | emacs-8c7f1e3596d1e4a52598392fbd78458f70bcb2c3.tar.gz emacs-8c7f1e3596d1e4a52598392fbd78458f70bcb2c3.zip | |
* ralloc.c (get_bloc): When initializing new_bloc->variable, cast
NIL to (POINTER *).
(malloc_init): Give warning if sbrk returns zero. Wonder what
that's supposed to mean.
Diffstat (limited to 'src/ralloc.c')
| -rw-r--r-- | src/ralloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ralloc.c b/src/ralloc.c index aceac44b938..d06472f8ea9 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -225,7 +225,7 @@ get_bloc (size) | |||
| 225 | new_bloc->data = get_more_space (size); | 225 | new_bloc->data = get_more_space (size); |
| 226 | new_bloc->size = size; | 226 | new_bloc->size = size; |
| 227 | new_bloc->next = NIL_BLOC; | 227 | new_bloc->next = NIL_BLOC; |
| 228 | new_bloc->variable = NIL; | 228 | new_bloc->variable = (POINTER *) NIL; |
| 229 | 229 | ||
| 230 | if (first_bloc) | 230 | if (first_bloc) |
| 231 | { | 231 | { |
| @@ -437,7 +437,11 @@ malloc_init (start, warn_func) | |||
| 437 | 437 | ||
| 438 | malloc_initialized = 1; | 438 | malloc_initialized = 1; |
| 439 | __morecore = r_alloc_sbrk; | 439 | __morecore = r_alloc_sbrk; |
| 440 | |||
| 440 | virtual_break_value = break_value = sbrk (0); | 441 | virtual_break_value = break_value = sbrk (0); |
| 442 | if (break_value == (POINTER)NULL) | ||
| 443 | (*warn_func)("Malloc initialization returned 0 from sbrk(0)."); | ||
| 444 | |||
| 441 | page_break_value = (POINTER) ROUNDUP (break_value); | 445 | page_break_value = (POINTER) ROUNDUP (break_value); |
| 442 | bzero (break_value, (page_break_value - break_value)); | 446 | bzero (break_value, (page_break_value - break_value)); |
| 443 | use_relocatable_buffers = 1; | 447 | use_relocatable_buffers = 1; |