Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A676F09D for ; Tue, 26 Mar 2013 09:22:32 +0000 (UTC) Received: (qmail 60143 invoked by uid 500); 26 Mar 2013 09:22:32 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 59574 invoked by uid 500); 26 Mar 2013 09:22:26 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 59545 invoked by uid 99); 26 Mar 2013 09:22:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 09:22:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stefan.fuhrmann@wandisco.com designates 209.85.223.177 as permitted sender) Received: from [209.85.223.177] (HELO mail-ie0-f177.google.com) (209.85.223.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 09:22:21 +0000 Received: by mail-ie0-f177.google.com with SMTP id tp5so4166817ieb.22 for ; Tue, 26 Mar 2013 02:22:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=eFn4pvcv5m+fBfGNNvy70kCwc1oDrI/OH4kglCUOQKE=; b=hNaBE4RxfKNZ2c6vT87aSbf0SbasR28EwSMEB+kMK312mlJSFSk6HDK/b4xk8o5oRj DnyhtLCJPQUKttVOr94RU5IVR49yirLnyq+kxRv56LKIfXMeywpTHcRbA7XsEIPSOeVV 3HZ8e/5suaGHqkU0H4ZYluzbdFQT8dmZeaPvuvuP8bYK6yByBIX6tZRz4wCIEEZINdNz MRWwXXliHJS0bEuTiNGS2T4WljDhzwEHshXrFKUnwRXCClxmOumA4e6FzkYv9hcZlvMm Sk7YrCznfpXoBPxAQNQ+eo0ny3fTbOCrGXrPmBTq2MhSnFzkXq+2JI5T5sa4b3Q1G/dw RYfg== MIME-Version: 1.0 X-Received: by 10.50.70.70 with SMTP id k6mr760889igu.81.1364289720813; Tue, 26 Mar 2013 02:22:00 -0700 (PDT) Received: by 10.50.40.230 with HTTP; Tue, 26 Mar 2013 02:22:00 -0700 (PDT) In-Reply-To: References: Date: Tue, 26 Mar 2013 10:22:00 +0100 Message-ID: Subject: Re: [PATCH] use apr macros to make cache-membuffer.c more portable From: Stefan Fuhrmann To: Joe Swatosh Cc: SVN Dev Content-Type: multipart/alternative; boundary=047d7b3a94e82e1ebc04d8d07460 X-Gm-Message-State: ALoCoQkzfH06UWs1lc2GabfDBNTlea7D+JsKZLJcQyXgfbNc8SGxWHP4VG4m6ygREakaKcpkr2Zb X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3a94e82e1ebc04d8d07460 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Mar 26, 2013 at 1:34 AM, Joe Swatosh wrote: > Inspired by Bert's comment in another thread about apr macros > Hi Joe, Thanks for the patch. Committed as 1461030. -- Stefan^2. > [[[ > Use apr macros to make code more portable. > > * subversion/libsvn_subr/cache-membuffer.c > (macros): use APR_UINT64_C instead of ull suffix to define > DEFAULT_MIN_SEGMENT_SIZE, MIN_SEGMENT_SIZE, and MAX_SEGMENT_SIZE. > ]]] > > Index: subversion/libsvn_subr/cache-membuffer.c > =================================================================== > --- subversion/libsvn_subr/cache-membuffer.c (revision 1460925) > +++ subversion/libsvn_subr/cache-membuffer.c (working copy) > @@ -116,11 +116,11 @@ > /* By default, don't create cache segments smaller than this value unless > * the total cache size itself is smaller. > */ > -#define DEFAULT_MIN_SEGMENT_SIZE 0x2000000ull > +#define DEFAULT_MIN_SEGMENT_SIZE APR_UINT64_C(0x2000000) > > /* The minimum segment size we will allow for multi-segmented caches > */ > -#define MIN_SEGMENT_SIZE 0x10000ull > +#define MIN_SEGMENT_SIZE APR_UINT64_C(0x10000) > > /* The maximum number of segments allowed. Larger numbers reduce the size > * of each segment, in turn reducing the max size of a cachable item. > @@ -133,7 +133,7 @@ > /* As of today, APR won't allocate chunks of 4GB or more. So, limit the > * segment size to slightly below that. > */ > -#define MAX_SEGMENT_SIZE 0xffff0000ull > +#define MAX_SEGMENT_SIZE APR_UINT64_C(0xffff0000) > > /* We don't mark the initialization status for every group but initialize > * a number of groups at once. That will allow for a very small init flags > -- *Join one of our free daily demo sessions on* *Scaling Subversion for the Enterprise * * * --047d7b3a94e82e1ebc04d8d07460 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Mar 26, 2013 at 1:34 AM, Joe Swatosh <joe.swatosh@gmail.com> wrote:
Inspired by Bert's comment in another thread about apr macros

Hi Joe,

Thanks for the patch. Committed as 1461030.=

-- Stefan^2.
=A0
[[[
Use apr macros to make code more portable.

=A0* subversion/libsvn_subr/cache-membuffer.c
=A0 =A0 (macros): use APR_UINT64_C instead of ull suffix to define
=A0 =A0 DEFAULT_MIN_SEGMENT_SIZE, MIN_SEGMENT_SIZE, and MAX_SEGMENT_SIZE. ]]]

Index: subversion/libsvn_subr/cache-membuffer.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- subversion/libsvn_subr/cache-membuffer.c =A0 =A0(revision 1460925)
+++ subversion/libsvn_subr/cache-membuffer.c =A0 =A0(working copy)
@@ -116,11 +116,11 @@
=A0/* By default, don't create cache segments smaller than this value u= nless
=A0 * the total cache size itself is smaller.
=A0 */
-#define DEFAULT_MIN_SEGMENT_SIZE 0x2000000ull
+#define DEFAULT_MIN_SEGMENT_SIZE APR_UINT64_C(0x2000000)

=A0/* The minimum segment size we will allow for multi-segmented caches
=A0 */
-#define MIN_SEGMENT_SIZE 0x10000ull
+#define MIN_SEGMENT_SIZE APR_UINT64_C(0x10000)

=A0/* The maximum number of segments allowed. Larger numbers reduce the siz= e
=A0 * of each segment, in turn reducing the max size of a cachable item. @@ -133,7 +133,7 @@
=A0/* As of today, APR won't allocate chunks of 4GB or more. So, limit = the
=A0 * segment size to slightly below that.
=A0 */
-#define MAX_SEGMENT_SIZE 0xffff0000ull
+#define MAX_SEGMENT_SIZE APR_UINT64_C(0xffff0000)

=A0/* We don't mark the initialization status for every group but initi= alize
=A0 * a number of groups at once. That will allow for a very small init fla= gs



--
Join on= e of our free daily demo sessions on Scaling Subversion for t= he Enterprise

--047d7b3a94e82e1ebc04d8d07460--