Initialize the mbuf allocator _before_ autoconfiguration; it might be

called when devices attach, take two.

Note that it is necessary that mbinit() NOT allocate memory, since it
is called before mb_map is created.  This is not a problem with the
pool allocator that is now used for mbufs and mbuf clusters.
This commit is contained in:
thorpej 1998-08-01 01:36:35 +00:00
parent e7521693c1
commit c56c24f4fd
1 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_main.c,v 1.126 1998/08/01 01:20:43 thorpej Exp $ */
/* $NetBSD: init_main.c,v 1.127 1998/08/01 01:36:35 thorpej Exp $ */
/*
* Copyright (c) 1995 Christopher G. Demetriou. All rights reserved.
@ -201,6 +201,13 @@ main()
vm_page_physrehash();
#endif
#endif /* UVM */
/*
* Initialize mbuf's. Do this now because we might attempt to
* allocate mbufs or mbuf clusters during autoconfiguration.
*/
mbinit();
disk_init(); /* must come before autoconfiguration */
tty_init(); /* initialise tty list */
#if NRND > 0
@ -307,9 +314,6 @@ main()
/* Start real time and statistics clocks. */
initclocks();
/* Initialize mbuf's. */
mbinit();
#ifdef REAL_CLISTS
/* Initialize clists. */
clist_init();