diff options
| -rw-r--r-- | src/ralloc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ralloc.c b/src/ralloc.c index 0a06d840843..50b1af8b155 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -506,8 +506,20 @@ r_alloc_init () | |||
| 506 | extra_bytes = ROUNDUP (50000); | 506 | extra_bytes = ROUNDUP (50000); |
| 507 | 507 | ||
| 508 | page_break_value = (POINTER) ROUNDUP (break_value); | 508 | page_break_value = (POINTER) ROUNDUP (break_value); |
| 509 | |||
| 510 | /* The extra call to real_morecore guarantees that the end of the | ||
| 511 | address space is a multiple of page_size, even if page_size is | ||
| 512 | not really the page size of the system running the binary in | ||
| 513 | which page_size is stored. This allows a binary to be built on a | ||
| 514 | system with one page size and run on a system with a smaller page | ||
| 515 | size. */ | ||
| 516 | (*real_morecore) (page_break_value - break_value); | ||
| 517 | |||
| 509 | /* Clear the rest of the last page; this memory is in our address space | 518 | /* Clear the rest of the last page; this memory is in our address space |
| 510 | even though it is after the sbrk value. */ | 519 | even though it is after the sbrk value. */ |
| 520 | /* Doubly true, with the additional call that explicitly adds the | ||
| 521 | rest of that page to the address space. */ | ||
| 511 | bzero (break_value, (page_break_value - break_value)); | 522 | bzero (break_value, (page_break_value - break_value)); |
| 523 | virtual_break_value = break_value = page_break_value; | ||
| 512 | use_relocatable_buffers = 1; | 524 | use_relocatable_buffers = 1; |
| 513 | } | 525 | } |