[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated

From: Ralph Corderoy
Subject: [Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 1.6-branchpoint-1312-g9514ca8
Date: Fri, 28 Apr 2017 19:08:40 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".

The branch, master has been updated
       via  9514ca81bd12a47df977822efc14ff285bd5bc10 (commit)
       via  24867fa77c867a444670cf484d32188ae0808777 (commit)
       via  213e031dda6a34c50c04de0d6041f45ab2db0a91 (commit)
       via  159b2a1ede7bd581508e8704112d83efd44e0dfa (commit)
       via  d07c6759a3b5b936e790834147ab7bd867645d4f (commit)
       via  4d3c5111a2a7716e957547cb80a1efe7accabf6f (commit)
       via  d7b80252561bfbdaacf37e6026e74690a08c2c9c (commit)
       via  c687e5bdd1da1a27b72cc9a4e94a1a2641fcf0d5 (commit)
       via  b5a92b55eb5670e982899e5dfd9aaa1d35db002f (commit)
       via  c8caafcb4a39516eaec330f9ea229ea52e5fe46b (commit)
       via  f77e0b578f71edb6f9105d5af8d54c8237cd9078 (commit)
       via  67733cd0356ecf398135fc3f2978aabcd6900783 (commit)
       via  5fa3d9aa99f952d8ca032f94f9c47b739e2ef7e7 (commit)
       via  95a6664c9c034cecff0c13b325de93397e81f18d (commit)
       via  4d57f81eef643ecd34082dc872557b6b4b6ec241 (commit)
       via  28bf8af2f50b353b5702b8c9214d4106f998c638 (commit)
       via  2a4506992638b36cd56c3f3d563dba019306f5af (commit)
       via  eee0d4e19ad62d5a2b8bd096b7037294f0250f73 (commit)
      from  fa377c31ac72f5c8253ae96f28185e510c26a720 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9514ca81bd12a47df977822efc14ff285bd5bc10
Author: Ralph Corderoy <address@hidden>
Date:   Sat Apr 29 00:01:58 2017 +0100

    Fix spelling in C comments.

commit 24867fa77c867a444670cf484d32188ae0808777
Author: Ralph Corderoy <address@hidden>
Date:   Fri Apr 28 22:42:46 2017 +0100

    bvector_copy: Use bvector's tiny storage if big enough.
    Otherwise a source bvector that's using tiny storage has its bits
    duplicated into a malloc'd area when the destination's tiny storage was

commit 213e031dda6a34c50c04de0d6041f45ab2db0a91
Author: Ralph Corderoy <address@hidden>
Date:   Fri Apr 28 22:08:26 2017 +0100

    sbr/oauth.c: Remove const to avoid curl's debug_callback warning.
    The curl_debug_callback typedef doesn't use const for any of the
    function's parameters.  On one of the compilation platforms here,
    oauth.c's debug_callback having const specifiers for some parameters
    causes compilation warnings, and -Werror stops the compilation.  Remove

commit 159b2a1ede7bd581508e8704112d83efd44e0dfa
Author: Ralph Corderoy <address@hidden>
Date:   Fri Apr 28 17:12:31 2017 +0100

    sbr/folder_read.c: Don't malloc() once per message.
    Instead of struct msgs having a pointer to a malloc'd array of pointers,
    each to a malloc'd struct bvector, 1+N, it now has a pointer to a
    malloc'd array of struct bvector;  one malloc for all of them.  This
    avoids the large number of calls to malloc() and free() that's linear
    with the size of the folder.
    But there are some downsides.  In order to step through an array of
    struct bvector, code outside of sbr/vector.c needs to know the struct's
    size.  The simplest way to do this is to make the struct's definition
    public, with a comment that access should be through vector.c.
    New functions are needed to initialise the content of an already
    allocated bvector, and to finish with its content prior to deallocation.
    bvector_create() and bvector_free() now also use these new functions.
    Before, it was the array of pointers to bvector that would be realloc'd.
    That doesn't work for the array of bvectors as they may contain pointers
    to within themselves.  The solution is to malloc a new array and
    bvector_copy() the ones to keep across, as folder_realloc() now does.
    The other half of its logic that coped with growth at the end of the
    array, has been deleted.  Also deleted, is the code to clear the
    bvectors before and after the old ones as they start in that state.

commit d07c6759a3b5b936e790834147ab7bd867645d4f
Author: Ralph Corderoy <address@hidden>
Date:   Fri Apr 28 17:00:54 2017 +0100

    valgrind: Add suppression for dbm_open(3)'s write(2).
    It writes bytes from an area it mallocs, but doesn't set all of those
    bytes first.  See with gdbm 1.13-1 on Arch Linux.

commit 4d3c5111a2a7716e957547cb80a1efe7accabf6f
Author: Ralph Corderoy <address@hidden>
Date:   Fri Apr 28 12:45:26 2017 +0100

    sbr/vector.c: Only allocate bvector storage for set bits.
    Now that a pointer to all the bit storage doesn't escape vector.c,
    there's no need to allocate storage, that's initialised to 0, just to
    then clear a bit in it.  Only extend the bits's storage for set bits.
    Remove the unused initial size parameter from bvector_create() as it
    simplifies the implementation.

commit d7b80252561bfbdaacf37e6026e74690a08c2c9c
Author: Ralph Corderoy <address@hidden>
Date:   Fri Apr 28 12:27:44 2017 +0100

    sbr/vector.c: Add bvector comments, tidy identifiers.

commit c687e5bdd1da1a27b72cc9a4e94a1a2641fcf0d5
Author: Ralph Corderoy <address@hidden>
Date:   Fri Apr 28 12:16:01 2017 +0100

    sbr/vector.c: Rewrite BVEC_BYTES(n) macro to remove branch.
    Use the idiom of integer truncation.

commit b5a92b55eb5670e982899e5dfd9aaa1d35db002f
Author: Ralph Corderoy <address@hidden>
Date:   Fri Apr 28 12:12:15 2017 +0100

    sbr/vector.c: Use new BVEC_BITS_BITS macro.
    Factors out a common expression from a few other places.

commit c8caafcb4a39516eaec330f9ea229ea52e5fe46b
Author: Ralph Corderoy <address@hidden>
Date:   Thu Apr 27 00:14:28 2017 +0100

    sbr/vector.c: Zero the growth with memset(3), not loop.
    When the resize functions grow the vectors, as they always do, zero the
    new slots with memset(3) rather than a for loop.  Particularly of note
    for the bit vector where it was bvector_clear()ing one bit at a time.
    Although a NULL pointer needn't have a representation of all-zero bits,
    the code was already assuming that, e.g. on the initial allocation, so
    we're no worse off.

commit f77e0b578f71edb6f9105d5af8d54c8237cd9078
Author: Ralph Corderoy <address@hidden>
Date:   Wed Apr 26 13:41:27 2017 +0100

    sbr/vector.c: Change bvector_bits() to return first word.
    Rename it to bvector_first_bits() to represent its new behaviour.  It
    has only one caller that uses it to produce debug.  Tighten the API so
    other callers don't get access to the location of the bvector's bits.

commit 67733cd0356ecf398135fc3f2978aabcd6900783
Author: Ralph Corderoy <address@hidden>
Date:   Tue Apr 25 23:21:21 2017 +0100

    sbr/vector.c: Embed initial vector storage in header struct.
    Instead of a malloc(3)'d struct bvector having a pointer to a separately
    malloc'd area for the bits in the normal case of the default initial
    size, have non-malloc'd storage in the struct itself, and set the
    pointer to that.  It's two unsigned longs, which is less than the
    previous default of 256 bits for struct bvector, but still double the
    pre-bvector norm of one word on 32 and 64-bit architectures.
    This halves the mallocs needed to create a struct bvector in the common
    case, but does mean that embedded memory is wasted should it not be
    enough.  That's probably an unusual case.  It also means derefencing the
    pointer to the bits probably hits the same cache line.
    Have separate initial sizes for string and int vectors.

commit 5fa3d9aa99f952d8ca032f94f9c47b739e2ef7e7
Author: Ralph Corderoy <address@hidden>
Date:   Tue Apr 25 00:20:08 2017 +0100

    sbr/vector.c: Remove `vec' argument from BVEC_OFFSET(), etc.
    A few macros took a struct bvector pointer as their first argument just
    to get the sizeof one of its fields.  This can be done with a NULL
    pointer so remove that argument from all of them.

commit 95a6664c9c034cecff0c13b325de93397e81f18d
Author: Ralph Corderoy <address@hidden>
Date:   Mon Apr 24 23:47:46 2017 +0100

    sbr/vector.c: Delete unused bvector_maxsize() and ivector_size().
    May as well keep the proffered interface as small as possible so the
    implementation can make greater assumptions knowing some internal
    details aren't available.

commit 4d57f81eef643ecd34082dc872557b6b4b6ec241
Author: Ralph Corderoy <address@hidden>
Date:   Mon Apr 24 22:58:56 2017 +0100

    sbr/vector.c: Move assert(3)s into bvector_create().
    Rather than asserting on every bit-related operation, assert just when
    creating the vector.  Whether the assertion is true is decided at
    compile time, so it only needs checking once;  once for every vector is
    an easy compromise.

commit 28bf8af2f50b353b5702b8c9214d4106f998c638
Author: Ralph Corderoy <address@hidden>
Date:   Mon Apr 24 22:08:09 2017 +0100

    sbr/vector.c: Replace Nbby with <limits.h>'s CHAR_BIT.
    POSIX mandates CHAR_BIT is 8;  see stdint.h(0p).

commit 2a4506992638b36cd56c3f3d563dba019306f5af
Author: Ralph Corderoy <address@hidden>
Date:   Mon Apr 24 21:19:56 2017 +0100

    sbr/vector.c: calloc(3) rather than malloc(3) and memset(3).
    calloc(3) tells libc upfront that the memory needs to be zeroed rather
    than giving it the news later with memset.  Perhaps this allows it to
    allocate from a CoW page of zero bytes, or it benefits from some other
    way in memset not having to clear each bit, but it knocks about 15% off
    the wall-clock time and the number of library calls under ltrace(1).

commit eee0d4e19ad62d5a2b8bd096b7037294f0250f73
Author: Ralph Corderoy <address@hidden>
Date:   Mon Apr 24 21:13:52 2017 +0100

    sbr/folder_read.c: Don't clear newly created bvectors.
    The newly created bvectors are already clear;  don't loop clearing each
    again with memset(3).


Summary of changes:
 h/addrsbr.h            |   2 +-
 h/aliasbr.h            |   4 +-
 h/fmt_compile.h        |   6 +-
 h/fmt_scan.h           |   2 +-
 h/mh.h                 |  29 +++++----
 h/mhparse.h            |   4 +-
 h/oauth.h              |   2 +-
 h/prototypes.h         |   4 +-
 h/tws.h                |   4 +-
 mts/smtp/smtp.h        |   2 +-
 sbr/addrsbr.c          |   4 +-
 sbr/context_read.c     |   4 +-
 sbr/datetime.c         |   2 +-
 sbr/dtime.c            |  10 +--
 sbr/dtimep.l           |   2 +-
 sbr/escape_addresses.c |   2 +-
 sbr/fmt_compile.c      |   2 +-
 sbr/folder_free.c      |   4 +-
 sbr/folder_read.c      |  11 +---
 sbr/folder_realloc.c   |  74 +++++------------------
 sbr/m_getfld.c         |   4 +-
 sbr/netsec.c           |   2 +-
 sbr/oauth.c            |   2 +-
 sbr/utils.c            |   2 +-
 sbr/vector.c           | 161 +++++++++++++++++++++++++------------------------
 test/valgrind.supp     |  14 +++++
 uip/annosbr.c          |   2 +-
 uip/fmttest.c          |   4 +-
 uip/folder.c           |   2 +-
 uip/forw.c             |   4 +-
 uip/inc.c              |   2 +-
 uip/mark.c             |   4 +-
 uip/mhbuildsbr.c       |   6 +-
 uip/mhfixmsg.c         |   2 +-
 uip/mhlsbr.c           |   6 +-
 uip/mhparse.c          |  10 +--
 uip/mhstoresbr.c       |   2 +-
 uip/popsbr.c           |   2 +-
 uip/post.c             |   2 +-
 uip/refile.c           |   2 +-
 uip/sendsbr.c          |   2 +-
 uip/sortm.c            |   4 +-
 42 files changed, 193 insertions(+), 222 deletions(-)

The nmh Mail Handling System

reply via email to

[Prev in Thread] Current Thread [Next in Thread]