apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr-util/misc apr_rmm.c
Date Wed, 07 Jul 2004 19:38:29 GMT
jorton      2004/07/07 12:38:29

  Modified:    misc     apr_rmm.c
  Log:
  * misc/apr_rmm.c (apr_rmm_overhead_get): Account for worst case
  alignment overhead too.
  
  Revision  Changes    Path
  1.27      +4 -1      apr-util/misc/apr_rmm.c
  
  Index: apr_rmm.c
  ===================================================================
  RCS file: /home/cvs/apr-util/misc/apr_rmm.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -d -w -u -r1.26 -r1.27
  --- apr_rmm.c	7 Jul 2004 17:15:18 -0000	1.26
  +++ apr_rmm.c	7 Jul 2004 19:38:29 -0000	1.27
  @@ -409,5 +409,8 @@
   
   APU_DECLARE(apr_size_t) apr_rmm_overhead_get(int n) 
   {
  -    return RMM_HDR_BLOCK_SIZE + n * RMM_BLOCK_SIZE;
  +    /* overhead per block is at most APR_ALIGN_DEFAULT(1) wasted bytes
  +     * for alignment overhead, plus the size of the rmm_block_t
  +     * structure. */
  +    return RMM_HDR_BLOCK_SIZE + n * (RMM_BLOCK_SIZE + APR_ALIGN_DEFAULT(1));
   }
  
  
  

Mime
View raw message