> Date: Fri, 24 Dec 2010 16:54:23 -0500 (EST)
> From: Ted Unangst <ted.unan...@gmail.com>
> 
> increase the hard limit on i386 max data size to 2GB-1.  This will allow 
> memory hungry processes to potentially use more RAM if you increase data 
> limits appropriately.

I really think that -1 is odd.  Where would those potential overflows be?

> Index: vmparam.h
> ===================================================================
> RCS file: /home/tedu/cvs/src/sys/arch/i386/include/vmparam.h,v
> retrieving revision 1.45
> diff -u -r1.45 vmparam.h
> --- vmparam.h 15 Dec 2010 05:30:19 -0000      1.45
> +++ vmparam.h 24 Dec 2010 21:52:07 -0000
> @@ -63,7 +63,7 @@
>  #define      DFLDSIZ         (64*1024*1024)          /* initial data size 
> limit */
>  #endif
>  #ifndef MAXDSIZ
> -#define      MAXDSIZ         (1024*1024*1024)        /* max data size */
> +#define      MAXDSIZ         (2UL*1024*1024*1024-1)  /* max data size. -1 to 
> avoid overflow */
>  #endif
>  #ifndef BRKSIZ
>  #define      BRKSIZ          (1024*1024*1024)        /* heap gap size */

Reply via email to