summaryrefslogtreecommitdiff
path: root/src/ralloc.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-08-19 06:36:35 +0000
committerJim Blandy <jimb@redhat.com>1992-08-19 06:36:35 +0000
commit14b732350f5689aa18000bcc986b44880a92e40c (patch)
treedae472415fe5ad42803314aece5f6f84cfa7710a /src/ralloc.c
parent06d15404bfd2bd5c6651fec800f778ca245e214c (diff)
downloademacs-14b732350f5689aa18000bcc986b44880a92e40c.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.c6
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;