Coverage Report

Created: 2025-11-09 06:44

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
301k
{
19
301k
  void *p = git__allocator.gmalloc(len, __FILE__, __LINE__);
20
21
301k
  if (!p)
22
0
    git_error_set_oom();
23
24
301k
  return p;
25
301k
}
Unexecuted instantiation: config_file_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
config.c:git__malloc
Line
Count
Source
18
759
{
19
759
  void *p = git__allocator.gmalloc(len, __FILE__, __LINE__);
20
21
759
  if (!p)
22
0
    git_error_set_oom();
23
24
759
  return p;
25
759
}
Unexecuted instantiation: config_cache.c:git__malloc
Unexecuted instantiation: config_file.c:git__malloc
Unexecuted instantiation: config_list.c:git__malloc
Unexecuted instantiation: config_mem.c:git__malloc
config_parse.c:git__malloc
Line
Count
Source
18
17.5k
{
19
17.5k
  void *p = git__allocator.gmalloc(len, __FILE__, __LINE__);
20
21
17.5k
  if (!p)
22
0
    git_error_set_oom();
23
24
17.5k
  return p;
25
17.5k
}
Unexecuted instantiation: config_snapshot.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: 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: parse.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: 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
Unexecuted instantiation: tag.c:git__malloc
Unexecuted instantiation: transaction.c:git__malloc
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
alloc.c:git__malloc
Line
Count
Source
18
283k
{
19
283k
  void *p = git__allocator.gmalloc(len, __FILE__, __LINE__);
20
21
283k
  if (!p)
22
0
    git_error_set_oom();
23
24
283k
  return p;
25
283k
}
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: strlist.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
Unexecuted instantiation: commit.c:git__malloc
Unexecuted instantiation: commit_graph.c:git__malloc
Unexecuted instantiation: commit_list.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: object.c:git__malloc
Unexecuted instantiation: object_api.c:git__malloc
Unexecuted instantiation: oidarray.c:git__malloc
Unexecuted instantiation: pack-objects.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: reflog.c:git__malloc
Unexecuted instantiation: refs.c:git__malloc
Unexecuted instantiation: refspec.c:git__malloc
Unexecuted instantiation: remote.c:git__malloc
Unexecuted instantiation: signature.c:git__malloc
Unexecuted instantiation: tls.c:git__malloc
Unexecuted instantiation: trace.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: 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
77.3k
{
29
77.3k
  void *p = git__allocator.grealloc(ptr, size, __FILE__, __LINE__);
30
31
77.3k
  if (!p)
32
0
    git_error_set_oom();
33
34
77.3k
  return p;
35
77.3k
}
Unexecuted instantiation: config_file_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
61.8k
{
29
61.8k
  void *p = git__allocator.grealloc(ptr, size, __FILE__, __LINE__);
30
31
61.8k
  if (!p)
32
0
    git_error_set_oom();
33
34
61.8k
  return p;
35
61.8k
}
Unexecuted instantiation: thread.c:git__realloc
Unexecuted instantiation: util.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_mem.c:git__realloc
Unexecuted instantiation: config_parse.c:git__realloc
Unexecuted instantiation: config_snapshot.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: 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: parse.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: 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: transaction.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
alloc.c:git__realloc
Line
Count
Source
28
15.5k
{
29
15.5k
  void *p = git__allocator.grealloc(ptr, size, __FILE__, __LINE__);
30
31
15.5k
  if (!p)
32
0
    git_error_set_oom();
33
34
15.5k
  return p;
35
15.5k
}
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: strlist.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: 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: object.c:git__realloc
Unexecuted instantiation: object_api.c:git__realloc
Unexecuted instantiation: oidarray.c:git__realloc
Unexecuted instantiation: pack-objects.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: reflog.c:git__realloc
Unexecuted instantiation: refs.c:git__realloc
Unexecuted instantiation: refspec.c:git__realloc
Unexecuted instantiation: remote.c:git__realloc
Unexecuted instantiation: signature.c:git__realloc
Unexecuted instantiation: tls.c:git__realloc
Unexecuted instantiation: trace.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: 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
557k
{
39
557k
  git__allocator.gfree(ptr);
40
557k
}
Unexecuted instantiation: config_file_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
1.65k
{
39
1.65k
  git__allocator.gfree(ptr);
40
1.65k
}
Unexecuted instantiation: thread.c:git__free
Unexecuted instantiation: util.c:git__free
config.c:git__free
Line
Count
Source
38
3.78k
{
39
3.78k
  git__allocator.gfree(ptr);
40
3.78k
}
Unexecuted instantiation: config_cache.c:git__free
Unexecuted instantiation: config_file.c:git__free
config_list.c:git__free
Line
Count
Source
38
281k
{
39
281k
  git__allocator.gfree(ptr);
40
281k
}
config_mem.c:git__free
Line
Count
Source
38
4.51k
{
39
4.51k
  git__allocator.gfree(ptr);
40
4.51k
}
config_parse.c:git__free
Line
Count
Source
38
263k
{
39
263k
  git__allocator.gfree(ptr);
40
263k
}
Unexecuted instantiation: config_snapshot.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: 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: parse.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
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
Unexecuted instantiation: tag.c:git__free
Unexecuted instantiation: transaction.c:git__free
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
Unexecuted instantiation: tree.c:git__free
Unexecuted instantiation: worktree.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: strlist.c:git__free
vector.c:git__free
Line
Count
Source
38
3.01k
{
39
3.01k
  git__allocator.gfree(ptr);
40
3.01k
}
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
Unexecuted instantiation: blob.c:git__free
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
Unexecuted instantiation: commit.c:git__free
Unexecuted instantiation: commit_graph.c:git__free
Unexecuted instantiation: commit_list.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: object.c:git__free
Unexecuted instantiation: object_api.c:git__free
Unexecuted instantiation: oidarray.c:git__free
Unexecuted instantiation: pack-objects.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: reflog.c:git__free
Unexecuted instantiation: refs.c:git__free
Unexecuted instantiation: refspec.c:git__free
Unexecuted instantiation: remote.c:git__free
Unexecuted instantiation: signature.c:git__free
Unexecuted instantiation: tls.c:git__free
Unexecuted instantiation: trace.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: 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