Coverage Report

Created: 2026-08-13 07:08

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libgit2/src/util/alloc.h
Line
Count
Source
1
/*
2
 * Copyright (C) the libgit2 contributors. All rights reserved.
3
 *
4
 * This file is part of libgit2, distributed under the GNU GPL v2 with
5
 * a Linking Exception. For full terms see the included COPYING file.
6
 */
7
8
#ifndef INCLUDE_alloc_h__
9
#define INCLUDE_alloc_h__
10
11
#include "git2/sys/alloc.h"
12
13
#include "git2_util.h"
14
15
extern git_allocator git__allocator;
16
17
GIT_INLINE(void *) git__malloc(size_t len)
18
34.6k
{
19
34.6k
  void *p = git__allocator.gmalloc(len, __FILE__, __LINE__);
20
21
34.6k
  if (!p)
22
0
    git_error_set_oom();
23
24
34.6k
  return p;
25
34.6k
}
Unexecuted instantiation: objects_fuzzer.c:git__malloc
Unexecuted instantiation: fuzzer_utils.c:git__malloc
Unexecuted instantiation: errors.c:git__malloc
Unexecuted instantiation: runtime.c:git__malloc
Unexecuted instantiation: str.c:git__malloc
Unexecuted instantiation: thread.c:git__malloc
Unexecuted instantiation: util.c:git__malloc
Unexecuted instantiation: libgit2.c:git__malloc
Unexecuted instantiation: merge_driver.c:git__malloc
Unexecuted instantiation: merge_file.c:git__malloc
Unexecuted instantiation: mwindow.c:git__malloc
Unexecuted instantiation: object.c:git__malloc
Unexecuted instantiation: object_api.c:git__malloc
Unexecuted instantiation: odb.c:git__malloc
Unexecuted instantiation: odb_loose.c:git__malloc
Unexecuted instantiation: odb_pack.c:git__malloc
Unexecuted instantiation: oid.c:git__malloc
Unexecuted instantiation: pack.c:git__malloc
Unexecuted instantiation: refdb_reftable.c:git__malloc
Unexecuted instantiation: reflog.c:git__malloc
Unexecuted instantiation: refs.c:git__malloc
Unexecuted instantiation: repository.c:git__malloc
Unexecuted instantiation: revparse.c:git__malloc
Unexecuted instantiation: revwalk.c:git__malloc
Unexecuted instantiation: settings.c:git__malloc
Unexecuted instantiation: signature.c:git__malloc
Unexecuted instantiation: strarray.c:git__malloc
Unexecuted instantiation: mbedtls.c:git__malloc
Unexecuted instantiation: openssl.c:git__malloc
Unexecuted instantiation: registry.c:git__malloc
Unexecuted instantiation: socket.c:git__malloc
Unexecuted instantiation: submodule.c:git__malloc
Unexecuted instantiation: sysdir.c:git__malloc
tag.c:git__malloc
Line
Count
Source
18
170
{
19
170
  void *p = git__allocator.gmalloc(len, __FILE__, __LINE__);
20
21
170
  if (!p)
22
0
    git_error_set_oom();
23
24
170
  return p;
25
170
}
Unexecuted instantiation: http.c:git__malloc
Unexecuted instantiation: httpclient.c:git__malloc
Unexecuted instantiation: httpparser.c:git__malloc
Unexecuted instantiation: smart_protocol.c:git__malloc
Unexecuted instantiation: ssh_libssh2.c:git__malloc
Unexecuted instantiation: tree.c:git__malloc
Unexecuted instantiation: worktree.c:git__malloc
Unexecuted instantiation: basics.c:git__malloc
Unexecuted instantiation: error.c:git__malloc
Unexecuted instantiation: iter.c:git__malloc
Unexecuted instantiation: merged.c:git__malloc
Unexecuted instantiation: pq.c:git__malloc
Unexecuted instantiation: record.c:git__malloc
Unexecuted instantiation: stack.c:git__malloc
Unexecuted instantiation: system.c:git__malloc
Unexecuted instantiation: table.c:git__malloc
Unexecuted instantiation: writer.c:git__malloc
alloc.c:git__malloc
Line
Count
Source
18
33.1k
{
19
33.1k
  void *p = git__allocator.gmalloc(len, __FILE__, __LINE__);
20
21
33.1k
  if (!p)
22
0
    git_error_set_oom();
23
24
33.1k
  return p;
25
33.1k
}
Unexecuted instantiation: failalloc.c:git__malloc
Unexecuted instantiation: stdalloc.c:git__malloc
Unexecuted instantiation: date.c:git__malloc
Unexecuted instantiation: filebuf.c:git__malloc
Unexecuted instantiation: fs_path.c:git__malloc
Unexecuted instantiation: futils.c:git__malloc
Unexecuted instantiation: hash.c:git__malloc
Unexecuted instantiation: net.c:git__malloc
Unexecuted instantiation: pool.c:git__malloc
Unexecuted instantiation: posix.c:git__malloc
Unexecuted instantiation: pqueue.c:git__malloc
Unexecuted instantiation: rand.c:git__malloc
Unexecuted instantiation: regexp.c:git__malloc
Unexecuted instantiation: vector.c:git__malloc
Unexecuted instantiation: wildmatch.c:git__malloc
Unexecuted instantiation: zstream.c:git__malloc
Unexecuted instantiation: map.c:git__malloc
Unexecuted instantiation: realpath.c:git__malloc
Unexecuted instantiation: collisiondetect.c:git__malloc
Unexecuted instantiation: sha1.c:git__malloc
Unexecuted instantiation: ubc_check.c:git__malloc
Unexecuted instantiation: builtin.c:git__malloc
Unexecuted instantiation: annotated_commit.c:git__malloc
Unexecuted instantiation: attr.c:git__malloc
Unexecuted instantiation: attr_file.c:git__malloc
Unexecuted instantiation: attrcache.c:git__malloc
Unexecuted instantiation: blob.c:git__malloc
Unexecuted instantiation: branch.c:git__malloc
Unexecuted instantiation: buf.c:git__malloc
Unexecuted instantiation: cache.c:git__malloc
Unexecuted instantiation: checkout.c:git__malloc
Unexecuted instantiation: clone.c:git__malloc
commit.c:git__malloc
Line
Count
Source
18
1.37k
{
19
1.37k
  void *p = git__allocator.gmalloc(len, __FILE__, __LINE__);
20
21
1.37k
  if (!p)
22
0
    git_error_set_oom();
23
24
1.37k
  return p;
25
1.37k
}
Unexecuted instantiation: commit_graph.c:git__malloc
Unexecuted instantiation: commit_list.c:git__malloc
Unexecuted instantiation: config.c:git__malloc
Unexecuted instantiation: config_cache.c:git__malloc
Unexecuted instantiation: config_file.c:git__malloc
Unexecuted instantiation: config_list.c:git__malloc
Unexecuted instantiation: config_parse.c:git__malloc
Unexecuted instantiation: config_snapshot.c:git__malloc
Unexecuted instantiation: delta.c:git__malloc
Unexecuted instantiation: diff.c:git__malloc
Unexecuted instantiation: diff_driver.c:git__malloc
Unexecuted instantiation: diff_generate.c:git__malloc
Unexecuted instantiation: diff_print.c:git__malloc
Unexecuted instantiation: diff_tform.c:git__malloc
Unexecuted instantiation: email.c:git__malloc
Unexecuted instantiation: filter.c:git__malloc
Unexecuted instantiation: grafts.c:git__malloc
Unexecuted instantiation: hashsig.c:git__malloc
Unexecuted instantiation: ident.c:git__malloc
Unexecuted instantiation: index.c:git__malloc
Unexecuted instantiation: index_map.c:git__malloc
Unexecuted instantiation: indexer.c:git__malloc
Unexecuted instantiation: iterator.c:git__malloc
Unexecuted instantiation: mailmap.c:git__malloc
Unexecuted instantiation: merge.c:git__malloc
Unexecuted instantiation: midx.c:git__malloc
Unexecuted instantiation: oidarray.c:git__malloc
Unexecuted instantiation: pack-objects.c:git__malloc
Unexecuted instantiation: parse.c:git__malloc
Unexecuted instantiation: patch.c:git__malloc
Unexecuted instantiation: patch_generate.c:git__malloc
Unexecuted instantiation: path.c:git__malloc
Unexecuted instantiation: pathspec.c:git__malloc
Unexecuted instantiation: push.c:git__malloc
Unexecuted instantiation: refdb.c:git__malloc
Unexecuted instantiation: refdb_fs.c:git__malloc
Unexecuted instantiation: refspec.c:git__malloc
Unexecuted instantiation: remote.c:git__malloc
Unexecuted instantiation: tls.c:git__malloc
Unexecuted instantiation: trace.c:git__malloc
Unexecuted instantiation: transaction.c:git__malloc
Unexecuted instantiation: transport.c:git__malloc
Unexecuted instantiation: auth.c:git__malloc
Unexecuted instantiation: credential.c:git__malloc
Unexecuted instantiation: git.c:git__malloc
Unexecuted instantiation: local.c:git__malloc
Unexecuted instantiation: smart.c:git__malloc
Unexecuted instantiation: smart_pkt.c:git__malloc
Unexecuted instantiation: tree-cache.c:git__malloc
Unexecuted instantiation: block.c:git__malloc
Unexecuted instantiation: blocksource.c:git__malloc
Unexecuted instantiation: sortedcache.c:git__malloc
Unexecuted instantiation: tsort.c:git__malloc
Unexecuted instantiation: utf8.c:git__malloc
Unexecuted instantiation: varint.c:git__malloc
Unexecuted instantiation: crlf.c:git__malloc
Unexecuted instantiation: diff_file.c:git__malloc
Unexecuted instantiation: diff_stats.c:git__malloc
Unexecuted instantiation: diff_xdiff.c:git__malloc
Unexecuted instantiation: fetch.c:git__malloc
Unexecuted instantiation: fetchhead.c:git__malloc
Unexecuted instantiation: graph.c:git__malloc
Unexecuted instantiation: ignore.c:git__malloc
Unexecuted instantiation: proxy.c:git__malloc
26
27
GIT_INLINE(void *) git__realloc(void *ptr, size_t size)
28
538
{
29
538
  void *p = git__allocator.grealloc(ptr, size, __FILE__, __LINE__);
30
31
538
  if (!p)
32
0
    git_error_set_oom();
33
34
538
  return p;
35
538
}
Unexecuted instantiation: objects_fuzzer.c:git__realloc
Unexecuted instantiation: fuzzer_utils.c:git__realloc
Unexecuted instantiation: errors.c:git__realloc
Unexecuted instantiation: runtime.c:git__realloc
str.c:git__realloc
Line
Count
Source
28
42
{
29
42
  void *p = git__allocator.grealloc(ptr, size, __FILE__, __LINE__);
30
31
42
  if (!p)
32
0
    git_error_set_oom();
33
34
42
  return p;
35
42
}
Unexecuted instantiation: thread.c:git__realloc
Unexecuted instantiation: util.c:git__realloc
Unexecuted instantiation: libgit2.c:git__realloc
Unexecuted instantiation: merge_driver.c:git__realloc
Unexecuted instantiation: merge_file.c:git__realloc
Unexecuted instantiation: mwindow.c:git__realloc
Unexecuted instantiation: object.c:git__realloc
Unexecuted instantiation: object_api.c:git__realloc
Unexecuted instantiation: odb.c:git__realloc
Unexecuted instantiation: odb_loose.c:git__realloc
Unexecuted instantiation: odb_pack.c:git__realloc
Unexecuted instantiation: oid.c:git__realloc
Unexecuted instantiation: pack.c:git__realloc
Unexecuted instantiation: refdb_reftable.c:git__realloc
Unexecuted instantiation: reflog.c:git__realloc
Unexecuted instantiation: refs.c:git__realloc
Unexecuted instantiation: repository.c:git__realloc
Unexecuted instantiation: revparse.c:git__realloc
Unexecuted instantiation: revwalk.c:git__realloc
Unexecuted instantiation: settings.c:git__realloc
Unexecuted instantiation: signature.c:git__realloc
Unexecuted instantiation: strarray.c:git__realloc
Unexecuted instantiation: mbedtls.c:git__realloc
Unexecuted instantiation: openssl.c:git__realloc
Unexecuted instantiation: registry.c:git__realloc
Unexecuted instantiation: socket.c:git__realloc
Unexecuted instantiation: submodule.c:git__realloc
Unexecuted instantiation: sysdir.c:git__realloc
Unexecuted instantiation: tag.c:git__realloc
Unexecuted instantiation: http.c:git__realloc
Unexecuted instantiation: httpclient.c:git__realloc
Unexecuted instantiation: httpparser.c:git__realloc
Unexecuted instantiation: smart_protocol.c:git__realloc
Unexecuted instantiation: ssh_libssh2.c:git__realloc
Unexecuted instantiation: tree.c:git__realloc
Unexecuted instantiation: worktree.c:git__realloc
Unexecuted instantiation: basics.c:git__realloc
Unexecuted instantiation: error.c:git__realloc
Unexecuted instantiation: iter.c:git__realloc
Unexecuted instantiation: merged.c:git__realloc
Unexecuted instantiation: pq.c:git__realloc
Unexecuted instantiation: record.c:git__realloc
Unexecuted instantiation: stack.c:git__realloc
Unexecuted instantiation: system.c:git__realloc
Unexecuted instantiation: table.c:git__realloc
Unexecuted instantiation: writer.c:git__realloc
alloc.c:git__realloc
Line
Count
Source
28
496
{
29
496
  void *p = git__allocator.grealloc(ptr, size, __FILE__, __LINE__);
30
31
496
  if (!p)
32
0
    git_error_set_oom();
33
34
496
  return p;
35
496
}
Unexecuted instantiation: failalloc.c:git__realloc
Unexecuted instantiation: stdalloc.c:git__realloc
Unexecuted instantiation: date.c:git__realloc
Unexecuted instantiation: filebuf.c:git__realloc
Unexecuted instantiation: fs_path.c:git__realloc
Unexecuted instantiation: futils.c:git__realloc
Unexecuted instantiation: hash.c:git__realloc
Unexecuted instantiation: net.c:git__realloc
Unexecuted instantiation: pool.c:git__realloc
Unexecuted instantiation: posix.c:git__realloc
Unexecuted instantiation: pqueue.c:git__realloc
Unexecuted instantiation: rand.c:git__realloc
Unexecuted instantiation: regexp.c:git__realloc
Unexecuted instantiation: vector.c:git__realloc
Unexecuted instantiation: wildmatch.c:git__realloc
Unexecuted instantiation: zstream.c:git__realloc
Unexecuted instantiation: map.c:git__realloc
Unexecuted instantiation: realpath.c:git__realloc
Unexecuted instantiation: collisiondetect.c:git__realloc
Unexecuted instantiation: sha1.c:git__realloc
Unexecuted instantiation: ubc_check.c:git__realloc
Unexecuted instantiation: builtin.c:git__realloc
Unexecuted instantiation: annotated_commit.c:git__realloc
Unexecuted instantiation: attr.c:git__realloc
Unexecuted instantiation: attr_file.c:git__realloc
Unexecuted instantiation: attrcache.c:git__realloc
Unexecuted instantiation: blob.c:git__realloc
Unexecuted instantiation: branch.c:git__realloc
Unexecuted instantiation: buf.c:git__realloc
Unexecuted instantiation: cache.c:git__realloc
Unexecuted instantiation: checkout.c:git__realloc
Unexecuted instantiation: clone.c:git__realloc
Unexecuted instantiation: commit.c:git__realloc
Unexecuted instantiation: commit_graph.c:git__realloc
Unexecuted instantiation: commit_list.c:git__realloc
Unexecuted instantiation: config.c:git__realloc
Unexecuted instantiation: config_cache.c:git__realloc
Unexecuted instantiation: config_file.c:git__realloc
Unexecuted instantiation: config_list.c:git__realloc
Unexecuted instantiation: config_parse.c:git__realloc
Unexecuted instantiation: config_snapshot.c:git__realloc
Unexecuted instantiation: delta.c:git__realloc
Unexecuted instantiation: diff.c:git__realloc
Unexecuted instantiation: diff_driver.c:git__realloc
Unexecuted instantiation: diff_generate.c:git__realloc
Unexecuted instantiation: diff_print.c:git__realloc
Unexecuted instantiation: diff_tform.c:git__realloc
Unexecuted instantiation: email.c:git__realloc
Unexecuted instantiation: filter.c:git__realloc
Unexecuted instantiation: grafts.c:git__realloc
Unexecuted instantiation: hashsig.c:git__realloc
Unexecuted instantiation: ident.c:git__realloc
Unexecuted instantiation: index.c:git__realloc
Unexecuted instantiation: index_map.c:git__realloc
Unexecuted instantiation: indexer.c:git__realloc
Unexecuted instantiation: iterator.c:git__realloc
Unexecuted instantiation: mailmap.c:git__realloc
Unexecuted instantiation: merge.c:git__realloc
Unexecuted instantiation: midx.c:git__realloc
Unexecuted instantiation: oidarray.c:git__realloc
Unexecuted instantiation: pack-objects.c:git__realloc
Unexecuted instantiation: parse.c:git__realloc
Unexecuted instantiation: patch.c:git__realloc
Unexecuted instantiation: patch_generate.c:git__realloc
Unexecuted instantiation: path.c:git__realloc
Unexecuted instantiation: pathspec.c:git__realloc
Unexecuted instantiation: push.c:git__realloc
Unexecuted instantiation: refdb.c:git__realloc
Unexecuted instantiation: refdb_fs.c:git__realloc
Unexecuted instantiation: refspec.c:git__realloc
Unexecuted instantiation: remote.c:git__realloc
Unexecuted instantiation: tls.c:git__realloc
Unexecuted instantiation: trace.c:git__realloc
Unexecuted instantiation: transaction.c:git__realloc
Unexecuted instantiation: transport.c:git__realloc
Unexecuted instantiation: auth.c:git__realloc
Unexecuted instantiation: credential.c:git__realloc
Unexecuted instantiation: git.c:git__realloc
Unexecuted instantiation: local.c:git__realloc
Unexecuted instantiation: smart.c:git__realloc
Unexecuted instantiation: smart_pkt.c:git__realloc
Unexecuted instantiation: tree-cache.c:git__realloc
Unexecuted instantiation: block.c:git__realloc
Unexecuted instantiation: blocksource.c:git__realloc
Unexecuted instantiation: sortedcache.c:git__realloc
Unexecuted instantiation: tsort.c:git__realloc
Unexecuted instantiation: utf8.c:git__realloc
Unexecuted instantiation: varint.c:git__realloc
Unexecuted instantiation: crlf.c:git__realloc
Unexecuted instantiation: diff_file.c:git__realloc
Unexecuted instantiation: diff_stats.c:git__realloc
Unexecuted instantiation: diff_xdiff.c:git__realloc
Unexecuted instantiation: fetch.c:git__realloc
Unexecuted instantiation: fetchhead.c:git__realloc
Unexecuted instantiation: graph.c:git__realloc
Unexecuted instantiation: ignore.c:git__realloc
Unexecuted instantiation: proxy.c:git__realloc
36
37
GIT_INLINE(void) git__free(void *ptr)
38
54.5k
{
39
54.5k
  git__allocator.gfree(ptr);
40
54.5k
}
Unexecuted instantiation: objects_fuzzer.c:git__free
Unexecuted instantiation: fuzzer_utils.c:git__free
Unexecuted instantiation: errors.c:git__free
Unexecuted instantiation: runtime.c:git__free
str.c:git__free
Line
Count
Source
38
2
{
39
2
  git__allocator.gfree(ptr);
40
2
}
Unexecuted instantiation: thread.c:git__free
Unexecuted instantiation: util.c:git__free
Unexecuted instantiation: libgit2.c:git__free
Unexecuted instantiation: merge_driver.c:git__free
Unexecuted instantiation: merge_file.c:git__free
Unexecuted instantiation: mwindow.c:git__free
Unexecuted instantiation: object.c:git__free
Unexecuted instantiation: object_api.c:git__free
Unexecuted instantiation: odb.c:git__free
Unexecuted instantiation: odb_loose.c:git__free
Unexecuted instantiation: odb_pack.c:git__free
Unexecuted instantiation: oid.c:git__free
Unexecuted instantiation: pack.c:git__free
Unexecuted instantiation: refdb_reftable.c:git__free
Unexecuted instantiation: reflog.c:git__free
Unexecuted instantiation: refs.c:git__free
Unexecuted instantiation: repository.c:git__free
Unexecuted instantiation: revparse.c:git__free
Unexecuted instantiation: revwalk.c:git__free
Unexecuted instantiation: settings.c:git__free
signature.c:git__free
Line
Count
Source
38
4.48k
{
39
4.48k
  git__allocator.gfree(ptr);
40
4.48k
}
Unexecuted instantiation: strarray.c:git__free
Unexecuted instantiation: mbedtls.c:git__free
Unexecuted instantiation: openssl.c:git__free
Unexecuted instantiation: registry.c:git__free
Unexecuted instantiation: socket.c:git__free
Unexecuted instantiation: submodule.c:git__free
Unexecuted instantiation: sysdir.c:git__free
tag.c:git__free
Line
Count
Source
38
8.32k
{
39
8.32k
  git__allocator.gfree(ptr);
40
8.32k
}
Unexecuted instantiation: http.c:git__free
Unexecuted instantiation: httpclient.c:git__free
Unexecuted instantiation: httpparser.c:git__free
Unexecuted instantiation: smart_protocol.c:git__free
Unexecuted instantiation: ssh_libssh2.c:git__free
tree.c:git__free
Line
Count
Source
38
5.54k
{
39
5.54k
  git__allocator.gfree(ptr);
40
5.54k
}
Unexecuted instantiation: worktree.c:git__free
Unexecuted instantiation: basics.c:git__free
Unexecuted instantiation: error.c:git__free
Unexecuted instantiation: iter.c:git__free
Unexecuted instantiation: merged.c:git__free
Unexecuted instantiation: pq.c:git__free
Unexecuted instantiation: record.c:git__free
Unexecuted instantiation: stack.c:git__free
Unexecuted instantiation: system.c:git__free
Unexecuted instantiation: table.c:git__free
Unexecuted instantiation: writer.c:git__free
Unexecuted instantiation: alloc.c:git__free
Unexecuted instantiation: failalloc.c:git__free
Unexecuted instantiation: stdalloc.c:git__free
Unexecuted instantiation: date.c:git__free
Unexecuted instantiation: filebuf.c:git__free
Unexecuted instantiation: fs_path.c:git__free
Unexecuted instantiation: futils.c:git__free
Unexecuted instantiation: hash.c:git__free
Unexecuted instantiation: net.c:git__free
Unexecuted instantiation: pool.c:git__free
Unexecuted instantiation: posix.c:git__free
Unexecuted instantiation: pqueue.c:git__free
Unexecuted instantiation: rand.c:git__free
Unexecuted instantiation: regexp.c:git__free
Unexecuted instantiation: vector.c:git__free
Unexecuted instantiation: wildmatch.c:git__free
Unexecuted instantiation: zstream.c:git__free
Unexecuted instantiation: map.c:git__free
Unexecuted instantiation: realpath.c:git__free
Unexecuted instantiation: collisiondetect.c:git__free
Unexecuted instantiation: sha1.c:git__free
Unexecuted instantiation: ubc_check.c:git__free
Unexecuted instantiation: builtin.c:git__free
Unexecuted instantiation: annotated_commit.c:git__free
Unexecuted instantiation: attr.c:git__free
Unexecuted instantiation: attr_file.c:git__free
Unexecuted instantiation: attrcache.c:git__free
blob.c:git__free
Line
Count
Source
38
2.77k
{
39
2.77k
  git__allocator.gfree(ptr);
40
2.77k
}
Unexecuted instantiation: branch.c:git__free
Unexecuted instantiation: buf.c:git__free
Unexecuted instantiation: cache.c:git__free
Unexecuted instantiation: checkout.c:git__free
Unexecuted instantiation: clone.c:git__free
commit.c:git__free
Line
Count
Source
38
33.4k
{
39
33.4k
  git__allocator.gfree(ptr);
40
33.4k
}
Unexecuted instantiation: commit_graph.c:git__free
Unexecuted instantiation: commit_list.c:git__free
Unexecuted instantiation: config.c:git__free
Unexecuted instantiation: config_cache.c:git__free
Unexecuted instantiation: config_file.c:git__free
Unexecuted instantiation: config_list.c:git__free
Unexecuted instantiation: config_parse.c:git__free
Unexecuted instantiation: config_snapshot.c:git__free
Unexecuted instantiation: delta.c:git__free
Unexecuted instantiation: diff.c:git__free
Unexecuted instantiation: diff_driver.c:git__free
Unexecuted instantiation: diff_generate.c:git__free
Unexecuted instantiation: diff_print.c:git__free
Unexecuted instantiation: diff_tform.c:git__free
Unexecuted instantiation: email.c:git__free
Unexecuted instantiation: filter.c:git__free
Unexecuted instantiation: grafts.c:git__free
Unexecuted instantiation: hashsig.c:git__free
Unexecuted instantiation: ident.c:git__free
Unexecuted instantiation: index.c:git__free
Unexecuted instantiation: index_map.c:git__free
Unexecuted instantiation: indexer.c:git__free
Unexecuted instantiation: iterator.c:git__free
Unexecuted instantiation: mailmap.c:git__free
Unexecuted instantiation: merge.c:git__free
Unexecuted instantiation: midx.c:git__free
Unexecuted instantiation: oidarray.c:git__free
Unexecuted instantiation: pack-objects.c:git__free
Unexecuted instantiation: parse.c:git__free
Unexecuted instantiation: patch.c:git__free
Unexecuted instantiation: patch_generate.c:git__free
Unexecuted instantiation: path.c:git__free
Unexecuted instantiation: pathspec.c:git__free
Unexecuted instantiation: push.c:git__free
Unexecuted instantiation: refdb.c:git__free
Unexecuted instantiation: refdb_fs.c:git__free
Unexecuted instantiation: refspec.c:git__free
Unexecuted instantiation: remote.c:git__free
Unexecuted instantiation: tls.c:git__free
Unexecuted instantiation: trace.c:git__free
Unexecuted instantiation: transaction.c:git__free
Unexecuted instantiation: transport.c:git__free
Unexecuted instantiation: auth.c:git__free
Unexecuted instantiation: credential.c:git__free
Unexecuted instantiation: git.c:git__free
Unexecuted instantiation: local.c:git__free
Unexecuted instantiation: smart.c:git__free
Unexecuted instantiation: smart_pkt.c:git__free
Unexecuted instantiation: tree-cache.c:git__free
Unexecuted instantiation: block.c:git__free
Unexecuted instantiation: blocksource.c:git__free
Unexecuted instantiation: sortedcache.c:git__free
Unexecuted instantiation: tsort.c:git__free
Unexecuted instantiation: utf8.c:git__free
Unexecuted instantiation: varint.c:git__free
Unexecuted instantiation: crlf.c:git__free
Unexecuted instantiation: diff_file.c:git__free
Unexecuted instantiation: diff_stats.c:git__free
Unexecuted instantiation: diff_xdiff.c:git__free
Unexecuted instantiation: fetch.c:git__free
Unexecuted instantiation: fetchhead.c:git__free
Unexecuted instantiation: graph.c:git__free
Unexecuted instantiation: ignore.c:git__free
Unexecuted instantiation: proxy.c:git__free
41
42
extern void *git__calloc(size_t nelem, size_t elsize);
43
extern void *git__mallocarray(size_t nelem, size_t elsize);
44
extern void *git__reallocarray(void *ptr, size_t nelem, size_t elsize);
45
46
extern char *git__strdup(const char *str);
47
extern char *git__strndup(const char *str, size_t n);
48
extern char *git__substrdup(const char *str, size_t n);
49
50
/**
51
 * This function is being called by our global setup routines to
52
 * initialize the standard allocator.
53
 */
54
int git_allocator_global_init(void);
55
56
/**
57
 * Switch out libgit2's global memory allocator
58
 *
59
 * @param allocator The new allocator that should be used. All function pointers
60
 *                  of it need to be set correctly.
61
 * @return An error code or 0.
62
 */
63
int git_allocator_setup(git_allocator *allocator);
64
65
#endif