• Show log

    Commit

  • Hash : 2bc8fa02
    Author : Russell Belfer
    Date : 2012-04-17T10:14:24

    Implement git_pool paged memory allocator
    
    This adds a `git_pool` object that can do simple paged memory
    allocation with free for the entire pool at once.  Using this,
    you can replace many small allocations with large blocks that
    can then cheaply be doled out in small pieces.  This is best
    used when you plan to free the small blocks all at once - for
    example, if they represent the parsed state from a file or data
    stream that are either all kept or all discarded.
    
    There are two real patterns of usage for `git_pools`: either
    for "string" allocation, where the item size is a single byte
    and you end up just packing the allocations in together, or for
    "fixed size" allocation where you are allocating a large object
    (e.g. a `git_oid`) and you generally just allocation single
    objects that can be tightly packed.  Of course, you can use it
    for other things, but those two cases are the easiest.
    

  • README.md

  • Writing Clar tests for libgit2

    For information on the Clar testing framework and a detailed introduction please visit:

    https://github.com/tanoku/clar

    • Write your modules and tests. Use good, meaningful names.

    • Make sure you actually build the tests by setting:

        cmake -DBUILD_CLAR=ON build/
    • Test:

        ./build/libgit2_clar
    • Make sure everything is fine.

    • Send your pull request. That’s it.