apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: apr-util/buckets apr_buckets_file.c
Date Wed, 28 Nov 2001 00:30:04 GMT
dougm       01/11/27 16:30:04

  Modified:    include  apr_mmap.h
               buckets  apr_buckets_file.c
  Log:
  namespace protect MMAP_{THRESHOLD,LIMIT} with APR_ prefix
  Reviewed by:	Cliff Woolley
  
  Revision  Changes    Path
  1.28      +9 -5      apr/include/apr_mmap.h
  
  Index: apr_mmap.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_mmap.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- apr_mmap.h	2001/11/27 23:50:47	1.27
  +++ apr_mmap.h	2001/11/28 00:30:04	1.28
  @@ -121,16 +121,20 @@
    * with systems where the expense of doing an mmap() and an munmap() outweighs
    * the benefit for small files.  It shouldn't be set lower than 1.
    */
  -#ifndef MMAP_THRESHOLD
  +#ifdef MMAP_THRESHOLD
  +#  define APR_MMAP_THRESHOLD              MMAP_THRESHOLD
  +#else
   #  ifdef SUNOS4
  -#    define MMAP_THRESHOLD                (8*1024)
  +#    define APR_MMAP_THRESHOLD            (8*1024)
   #  else
  -#    define MMAP_THRESHOLD                1
  +#    define APR_MMAP_THRESHOLD            1
   #  endif /* SUNOS4 */
   #endif /* MMAP_THRESHOLD */
   
  -#ifndef MMAP_LIMIT
  -#  define MMAP_LIMIT                      (4*1024*1024)
  +#ifdef MMAP_LIMIT
  +#  define APR_MMAP_LIMIT                  MMAP_LIMIT
  +#else
  +#  define APR_MMAP_LIMIT                  (4*1024*1024)
   #endif /* MMAP_LIMIT */
   
   /*   Function definitions */
  
  
  
  1.60      +2 -2      apr-util/buckets/apr_buckets_file.c
  
  Index: apr_buckets_file.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_file.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- apr_buckets_file.c	2001/11/27 23:50:47	1.59
  +++ apr_buckets_file.c	2001/11/28 00:30:04	1.60
  @@ -84,8 +84,8 @@
       apr_bucket_file *a = e->data;
       apr_mmap_t *mm;
   
  -    if ((filelength >= MMAP_THRESHOLD) &&
  -        (filelength < MMAP_LIMIT) &&
  +    if ((filelength >= APR_MMAP_THRESHOLD) &&
  +        (filelength < APR_MMAP_LIMIT) &&
           (apr_mmap_create(&mm, a->fd, fileoffset, filelength,
                            APR_MMAP_READ, p) == APR_SUCCESS))
       {
  
  
  

Mime
View raw message