diff options
author | Jim Blandy <jimb@redhat.com> | 1992-08-19 06:36:35 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-08-19 06:36:35 +0000 |
commit | 8c7f1e3596d1e4a52598392fbd78458f70bcb2c3 (patch) | |
tree | 342275eaf0779057e5ffff8af0408d2e36f81b9c /src/ralloc.c | |
parent | 0ad77c5462a616798329b28a38eeecf08e8f7573 (diff) | |
download | emacs-8c7f1e3596d1e4a52598392fbd78458f70bcb2c3.tar.gz |
* 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) new_bloc->data = get_more_space (size); new_bloc->size = size; new_bloc->next = NIL_BLOC; - new_bloc->variable = NIL; + new_bloc->variable = (POINTER *) NIL; if (first_bloc) { @@ -437,7 +437,11 @@ malloc_init (start, warn_func) malloc_initialized = 1; __morecore = r_alloc_sbrk; + virtual_break_value = break_value = sbrk (0); + if (break_value == (POINTER)NULL) + (*warn_func)("Malloc initialization returned 0 from sbrk(0)."); + page_break_value = (POINTER) ROUNDUP (break_value); bzero (break_value, (page_break_value - break_value)); use_relocatable_buffers = 1; |