mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 17:32:43 +00:00
Move the call to extend_heap() from main to start so that if our BSS
expands beyond the limit we will extend the address space before trying to zero the BSS. This should give us plenty of headroom for modest expansion of the loader.
This commit is contained in:
parent
75cdadceb4
commit
d2041924cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67593
@ -66,8 +66,8 @@ memsize()
|
||||
/* #define XTRA_PAGES 32 */
|
||||
#define XTRA_PAGES 64
|
||||
|
||||
static void
|
||||
extend_heap()
|
||||
void
|
||||
extend_heap(void)
|
||||
{
|
||||
struct rpb *hwrpb = (struct rpb *)HWRPB_ADDR;
|
||||
struct mddt *mddtp;
|
||||
@ -119,7 +119,6 @@ main(void)
|
||||
* alloc() is usable. The stack is buried inside us, so this is
|
||||
* safe.
|
||||
*/
|
||||
extend_heap();
|
||||
setheap((void *)end, (void *)(0x20040000 + XTRA_PAGES * 8192));
|
||||
|
||||
#ifdef LOADER
|
||||
|
@ -52,6 +52,10 @@ NESTED(start, 1, ENTRY_FRAME, ra, 0, 0)
|
||||
Lstartgp:
|
||||
LDGP(pv)
|
||||
|
||||
#ifndef BOOT1
|
||||
CALL(extend_heap)
|
||||
#endif
|
||||
|
||||
lda a0,_edata
|
||||
lda a1,_end
|
||||
subq a1,a0,a1
|
||||
|
Loading…
Reference in New Issue
Block a user