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:
dfr 2000-10-25 23:36:01 +00:00
parent 0b955e26d9
commit c10c0d316a
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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