Let M_PANIC go back to the private tree as its intention isn't understood well
for now.
This commit is contained in:
parent
2508f69037
commit
1707240d2a
@ -164,8 +164,7 @@ malloc(size, type, flags)
|
||||
if (flags & M_NOWAIT) {
|
||||
splx(s);
|
||||
mtx_exit(&malloc_mtx, MTX_DEF);
|
||||
va = NULL;
|
||||
goto checkpanic;
|
||||
return ((void *) NULL);
|
||||
}
|
||||
if (ksp->ks_limblocks < 65535)
|
||||
ksp->ks_limblocks++;
|
||||
@ -189,7 +188,7 @@ malloc(size, type, flags)
|
||||
|
||||
if (va == NULL) {
|
||||
splx(s);
|
||||
goto checkpanic;
|
||||
return ((void *) NULL);
|
||||
}
|
||||
/*
|
||||
* Enter malloc_mtx after the error check to avoid having to
|
||||
@ -283,9 +282,6 @@ out:
|
||||
/* XXX: Do idle pre-zeroing. */
|
||||
if (va != NULL && (flags & M_ZERO))
|
||||
bzero(va, size);
|
||||
checkpanic:
|
||||
if (va == NULL && (flags & M_PANIC))
|
||||
panic("malloc: failed to allocate %ld bytes", size);
|
||||
return ((void *) va);
|
||||
}
|
||||
|
||||
|
@ -120,8 +120,7 @@ locreate(int unit)
|
||||
{
|
||||
struct lo_softc *sc;
|
||||
|
||||
MALLOC(sc, struct lo_softc *, sizeof(*sc), M_LO,
|
||||
M_WAITOK | M_ZERO | M_PANIC);
|
||||
MALLOC(sc, struct lo_softc *, sizeof(*sc), M_LO, M_WAITOK | M_ZERO);
|
||||
|
||||
sc->sc_if.if_name = "lo";
|
||||
sc->sc_if.if_unit = unit;
|
||||
|
@ -47,7 +47,6 @@
|
||||
#define M_USE_RESERVE 0x0002 /* can alloc out of reserve memory */
|
||||
#define M_ASLEEP 0x0004 /* async sleep on failure */
|
||||
#define M_ZERO 0x0008 /* bzero the allocation */
|
||||
#define M_PANIC 0x0010 /* panic if allocation failed */
|
||||
|
||||
#define M_MAGIC 877983977 /* time when first defined :-) */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user