Date: Wed, 15 Feb 2012 06:16:52 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r231742 - stable/8/sys/dev/netmap Message-ID: <201202150616.q1F6GqVf040582@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: luigi Date: Wed Feb 15 06:16:52 2012 New Revision: 231742 URL: http://svn.freebsd.org/changeset/base/231742 Log: use 4096 instead of PAGE_SIZE to determine the initial size of the memory allocated for netmap. Apparently the previous value fails with an integer overflow on stable/8-IA64 (4M pages ? curious that it does not fail on stable/9 and head) Modified: stable/8/sys/dev/netmap/netmap.c Modified: stable/8/sys/dev/netmap/netmap.c ============================================================================== --- stable/8/sys/dev/netmap/netmap.c Wed Feb 15 05:37:41 2012 (r231741) +++ stable/8/sys/dev/netmap/netmap.c Wed Feb 15 06:16:52 2012 (r231742) @@ -133,7 +133,7 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, no_pen * At the moment the block is contiguous, but we can easily * restrict our demand to smaller units (16..64k) */ -#define NETMAP_MEMORY_SIZE (64 * 1024 * PAGE_SIZE) +#define NETMAP_MEMORY_SIZE (64 * 1024 * 4096) static void * netmap_malloc(size_t size, const char *msg); static void netmap_free(void *addr, const char *msg);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202150616.q1F6GqVf040582>