[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: allocating memory during kernel startup
On Thu, May 06, 2010 at 02:32:57PM -0400, Michael wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> I recently ran into this problem - there is no easy way to determine
> wether it is safe to call kmem_alloc() yet ( as in, are we far
> enough through startup ) and when we call it too early the whole
> thing just hangs.
We have no clear definition of the kernel state - what is boot, startup,
and when it's done.
> Any chance to just have kmem_alloc() immediately return NULL if it
> isn't ready yet so we can fail gracefully instead of hanging?
I like panic().
I think that complicating memory allocation in bootstrap is not a good
thing. What is your purpose?
> have fun
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
> -----END PGP SIGNATURE-----
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
Main Index |
Thread Index |