aboutsummaryrefslogtreecommitdiffstats
path: root/src/ralloc.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-11-18 09:26:05 +0000
committerRichard M. Stallman <[email protected]>1993-11-18 09:26:05 +0000
commit0e93a7cf3fe10e76ef313e6d7ff4936c2d86ac12 (patch)
tree0d47b12273a005a3eafe0a1be04856d5040e9e11 /src/ralloc.c
parent9afa5873c4c32aa0add5dcf03d1a3239f9d64309 (diff)
(r_alloc_init): Explicitly use real_morecore
to allocate the entire incomplete page.
Diffstat (limited to 'src/ralloc.c')
-rw-r--r--src/ralloc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index 0a06d84084..50b1af8b15 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -506,8 +506,20 @@ r_alloc_init ()
extra_bytes = ROUNDUP (50000);
page_break_value = (POINTER) ROUNDUP (break_value);
+
+ /* The extra call to real_morecore guarantees that the end of the
+ address space is a multiple of page_size, even if page_size is
+ not really the page size of the system running the binary in
+ which page_size is stored. This allows a binary to be built on a
+ system with one page size and run on a system with a smaller page
+ size. */
+ (*real_morecore) (page_break_value - break_value);
+
/* Clear the rest of the last page; this memory is in our address space
even though it is after the sbrk value. */
+ /* Doubly true, with the additional call that explicitly adds the
+ rest of that page to the address space. */
bzero (break_value, (page_break_value - break_value));
+ virtual_break_value = break_value = page_break_value;
use_relocatable_buffers = 1;
}