diff options
| author | Richard M. Stallman | 1993-11-18 09:26:05 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-18 09:26:05 +0000 |
| commit | 0e93a7cf3fe10e76ef313e6d7ff4936c2d86ac12 (patch) | |
| tree | 0d47b12273a005a3eafe0a1be04856d5040e9e11 /src/ralloc.c | |
| parent | 9afa5873c4c32aa0add5dcf03d1a3239f9d64309 (diff) | |
| download | emacs-0e93a7cf3fe10e76ef313e6d7ff4936c2d86ac12.tar.gz emacs-0e93a7cf3fe10e76ef313e6d7ff4936c2d86ac12.zip | |
(r_alloc_init): Explicitly use real_morecore
to allocate the entire incomplete page.
Diffstat (limited to 'src/ralloc.c')
| -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 | } |