Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ziglang/zig
base: f2d601661d28
Choose a base ref
...
head repository: ziglang/zig
compare: 4a4ea92cf383
Choose a head ref
  • 2 commits
  • 14 files changed
  • 1 contributor

Commits on Feb 12, 2018

  1. introduce std.heap.ArenaAllocator and std.heap.DirectAllocator

     * DirectAllocator does the underlying syscall for every allocation.
     * ArenaAllocator takes another allocator as an argument and
       allocates bytes up front, falling back to DirectAllocator with
       increasingly large allocation sizes, to avoid calling it too often.
       Then the entire arena can be freed at once.
    
    The self hosted parser is updated to take advantage of ArenaAllocator
    for the AST that it returns. This significantly reduces the complexity
    of cleanup code.
    
    docgen and build runner are updated to use the combination of
    ArenaAllocator and DirectAllocator instead of IncrementingAllocator,
    which is now deprecated in favor of FixedBufferAllocator combined
    with DirectAllocator.
    
    The C allocator calls aligned_alloc instead of malloc, in order to
    respect the alignment parameter.
    
    Added asserts in Allocator to ensure that implementors of the
    interface return slices of the correct size.
    
    Fixed a bug in Allocator when you call realloc to grow the allocation.
    andrewrk committed Feb 12, 2018
    Copy the full SHA
    445b033 View commit details
    Browse the repository at this point in the history
  2. remove std.heap.IncrementingAllocator

    Use std.heap.FixedBufferAllocator combined with
    std.heap.DirectAllocator instead.
    
    std.mem.FixedBufferAllocator is moved to std.heap.FixedBufferAllocator
    andrewrk committed Feb 12, 2018
    Copy the full SHA
    4a4ea92 View commit details
    Browse the repository at this point in the history