diff options
author | jhb <jhb@FreeBSD.org> | 2006-03-07 21:31:20 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-03-07 21:31:20 +0000 |
commit | baf476eca4da677659c459cdbd3534f2f9c1e690 (patch) | |
tree | 4347a0cc31d280839d2a8c2cc73fbdcc334de7d4 | |
parent | 017207e77bff4727a3b40f35986aad464283bac8 (diff) | |
download | FreeBSD-src-baf476eca4da677659c459cdbd3534f2f9c1e690.zip FreeBSD-src-baf476eca4da677659c459cdbd3534f2f9c1e690.tar.gz |
For consistency sake, use >= MINCLSIZE rather than > MINCLSIZE to determine
whether or not to allocate a full mbuf cluster rather than just a plain
mbuf when adding on additional mbufs in m_getm(). In practice, there wasn't
any resulting mem trashing since m_getm() doesn't ever allocate an mbuf with
a packet header, and MINCLSIZE is the available payload in an mbuf with a
header rather than the available payload in a plain mbuf.
Discussed with: andre (lightly)
-rw-r--r-- | sys/kern/uipc_mbuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index d2b1130..0eb8a70 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -131,7 +131,7 @@ m_getm(struct mbuf *m, int len, int how, short type) cur = (cur->m_next = mb); } if (rem > 0) { - mb = (rem > MINCLSIZE) ? + mb = (rem >= MINCLSIZE) ? m_getcl(how, type, 0) : m_get(how, type); if (mb == NULL) goto failed; |