summaryrefslogtreecommitdiff
path: root/src/allocators/stdalloc.c
Commit message (Collapse)AuthorAgeFilesLines
* Update src/allocators/stdalloc.cEdward Thomson2021-07-201-1/+1
| | | Co-authored-by: lhchavez <lhchavez@lhchavez.com>
* alloc: add GIT_DEBUG_STRICT_ALLOCEdward Thomson2021-07-191-10/+41
| | | | | | | | | | | Add `GIT_DEBUG_STRICT_ALLOC` to help identify problematic callers of allocation code that pass a `0` size to the allocators and then expect a non-`NULL` return. When given a 0-size allocation, `malloc` _may_ return either a `NULL` _or_ a pointer that is not writeable. Most systems return a non-`NULL` pointer; AIX is an outlier. We should be able to cope with this AIXy behavior, so this adds an option to emulate it.
* allocators: move standard allocator into subdirectoryPatrick Steinhardt2019-02-211-0/+119
Right now, our two allocator implementations are scattered around the tree in "stdalloc.h" and "win32/w32_crtdbg_stacktrace.h". Start grouping them together in a single directory "allocators/", similar to how e.g. our streams are organized.