patch-2.0.22 linux/net/unix/af_unix.c

Next file: linux/scripts/mkdep.c
Previous file: linux/net/ipv4/udp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.21/linux/net/unix/af_unix.c linux/net/unix/af_unix.c
@@ -931,9 +931,9 @@
 		 *	have suggested. Big mallocs stress the vm too
 		 *	much.
 		 */
-
-		if(size > 4000 && sock->type!=SOCK_DGRAM)
-			limit = 4000;	/* Fall back to 4K if we can't grab a big buffer this instant */
+#define MAX_ALLOC (PAGE_SIZE*7/8)
+		if(size > MAX_ALLOC && sock->type!=SOCK_DGRAM)
+			limit = MAX_ALLOC;	/* Fall back to 4K if we can't grab a big buffer this instant */
 		else
 			limit = 0;	/* Otherwise just grab and wait */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov