MCPcopy Create free account
hub / github.com/git/git / mem_pool_init

Function mem_pool_init

mem-pool.c:61–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void mem_pool_init(struct mem_pool *pool, size_t initial_size)
62{
63 memset(pool, 0, sizeof(*pool));
64 pool->block_alloc = BLOCK_GROWTH_SIZE;
65
66 if (initial_size > 0)
67 mem_pool_alloc_block(pool, initial_size, NULL);
68}
69
70void mem_pool_discard(struct mem_pool *pool, int invalidate_memory)
71{

Callers 12

merge_startFunction · 0.85
move_cache_to_base_indexFunction · 0.85
diffcore_rename_extendedFunction · 0.85
oidtree_initFunction · 0.85
find_mem_poolFunction · 0.85
load_all_cache_entriesFunction · 0.85
sort_stdinFunction · 0.85
cmd_name_revFunction · 0.85
checkout_worktreeFunction · 0.85

Calls 1

mem_pool_alloc_blockFunction · 0.85

Tested by 1

sort_stdinFunction · 0.68