aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_deflate.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2018-01-21 15:42:36 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2018-01-21 15:42:36 +0000
commitac2fffa4b74cd83963f0d462c379c7f50eeabf20 (patch)
tree1f8fc635121499d467998c99ece5983a2d563840 /sys/netgraph/ng_deflate.c
parente09304d8f33887be9cc37817885061ccbb770d50 (diff)
downloadsrc-ac2fffa4b74cd83963f0d462c379c7f50eeabf20.tar.gz
src-ac2fffa4b74cd83963f0d462c379c7f50eeabf20.zip
Revert r327828, r327949, r327953, r328016-r328026, r328041:
Uses of mallocarray(9). The use of mallocarray(9) has rocketed the required swap to build FreeBSD. This is likely caused by the allocation size attributes which put extra pressure on the compiler. Given that most of these checks are superfluous we have to choose better where to use mallocarray(9). We still have more uses of mallocarray(9) but hopefully this is enough to bring swap usage to a reasonable level. Reported by: wosch PR: 225197
Notes
Notes: svn path=/head/; revision=328218
Diffstat (limited to 'sys/netgraph/ng_deflate.c')
-rw-r--r--sys/netgraph/ng_deflate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netgraph/ng_deflate.c b/sys/netgraph/ng_deflate.c
index bb6a1823b42c..9c0ab7a753e2 100644
--- a/sys/netgraph/ng_deflate.c
+++ b/sys/netgraph/ng_deflate.c
@@ -427,7 +427,7 @@ static void *
z_alloc(void *notused, u_int items, u_int size)
{
- return (mallocarray(items, size, M_NETGRAPH_DEFLATE, M_NOWAIT));
+ return (malloc(items * size, M_NETGRAPH_DEFLATE, M_NOWAIT));
}
static void