1 Return-Path: <beheerder@tekenbeetziekten.nl>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 03913431FD6
\r
6 for <notmuch@notmuchmail.org>; Wed, 13 Feb 2013 07:15:42 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Czk6-AiFDpLX for <notmuch@notmuchmail.org>;
\r
16 Wed, 13 Feb 2013 07:15:41 -0800 (PST)
\r
17 Received: from srv047132.webreus.nl (srv047132.webreus.nl [46.235.47.132])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 0CAFC431FC9
\r
21 for <notmuch@notmuchmail.org>; Wed, 13 Feb 2013 07:15:40 -0800 (PST)
\r
22 Received: (qmail 17519 invoked from network); 13 Feb 2013 16:15:39 +0100
\r
23 Received: from ip73-109-210-87.adsl2.static.versatel.nl (HELO PCvangebruike)
\r
25 by srv047132.webreus.nl with SMTP; 13 Feb 2013 16:15:37 +0100
\r
26 From: "Robert Mast" <beheerder@tekenbeetziekten.nl>
\r
27 To: <notmuch@notmuchmail.org>
\r
28 References: <1359917491-17178-1-git-send-email-beheerder@tekenbeetziekten.nl>
\r
29 <1360768303-4228-1-git-send-email-beheerder@tekenbeetziekten.nl>
\r
30 In-Reply-To: <1360768303-4228-1-git-send-email-beheerder@tekenbeetziekten.nl>
\r
31 Subject: RE: [english 100%] [PATCH] bitmap:improve memory usage using
\r
32 CHAR_BITS and unsigned CHAR
\r
33 Date: Wed, 13 Feb 2013 16:15:32 +0100
\r
34 Message-ID: <007501ce09fc$f85e20d0$e91a6270$@nl>
\r
36 Content-Type: text/plain;
\r
38 Content-Transfer-Encoding: quoted-printable
\r
39 X-Mailer: Microsoft Office Outlook 12.0
\r
40 Thread-Index: Ac4J/Hr6NuL3/WjCTt+Lnhvxo3iRWAAAGxUw
\r
41 Content-Language: nl
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Wed, 13 Feb 2013 15:15:42 -0000
\r
56 Somehow my comments don't get through... I'll try it another way.
\r
58 -----Oorspronkelijk bericht-----
\r
59 Van: Robert Mast [mailto:beheerder@tekenbeetziekten.nl]=20
\r
60 Verzonden: woensdag 13 februari 2013 16:12
\r
61 Aan: notmuch@notmuchmail.org
\r
63 Onderwerp: [english 100%] [PATCH] bitmap:improve memory usage using =
\r
64 CHAR_BITS and unsigned CHAR
\r
66 diff --git a/lib/query.cc b/lib/query.cc index e9c1a2d..7381a54 100644
\r
69 @@ -39,12 +39,12 @@ typedef struct _notmuch_mset_messages { } =
\r
70 notmuch_mset_messages_t;
\r
72 struct _notmuch_doc_id_set {
\r
73 - unsigned int *bitmap;
\r
74 + unsigned char *bitmap;
\r
78 -#define DOCIDSET_WORD(bit) ((bit) / sizeof (unsigned int)) -#define =
\r
79 DOCIDSET_BIT(bit) ((bit) % sizeof (unsigned int))
\r
80 +#define DOCIDSET_WORD(bit) ((bit) / CHAR_BIT) #define DOCIDSET_BIT(bit) =
\r
84 struct visible _notmuch_threads {
\r
85 notmuch_query_t *query;
\r
86 @@ -359,11 +359,11 @@ _notmuch_doc_id_set_init (void *ctx,
\r
89 unsigned int max =3D 0;
\r
90 - unsigned int *bitmap;
\r
91 + unsigned char *bitmap;
\r
93 for (unsigned int i =3D 0; i < arr->len; i++)
\r
94 max =3D MAX(max, g_array_index (arr, unsigned int, i));
\r
95 - bitmap =3D talloc_zero_array (ctx, unsigned int, 1 + max / sizeof =
\r
97 + bitmap =3D talloc_zero_array (ctx, unsigned char, =
\r
98 DOCIDSET_WORD(max)=20
\r
101 if (bitmap =3D=3D NULL)
\r