MCPcopy Index your code
hub / github.com/git/git / read_bitmap

Function read_bitmap

pack-bitmap.c:172–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172struct ewah_bitmap *read_bitmap(const unsigned char *map,
173 size_t map_size, size_t *map_pos)
174{
175 struct ewah_bitmap *b = ewah_pool_new();
176
177 ssize_t bitmap_size = ewah_read_mmap(b, map + *map_pos,
178 map_size - *map_pos);
179
180 if (bitmap_size < 0) {
181 error(_("failed to load bitmap index (corrupted?)"));
182 ewah_pool_free(b);
183 return NULL;
184 }
185
186 *map_pos += bitmap_size;
187
188 return b;
189}
190
191/*
192 * Read a bitmap from the current read position on the mmaped

Callers 3

read_bitmap_1Function · 0.85
pseudo_merge_bitmapFunction · 0.85
use_pseudo_mergeFunction · 0.85

Calls 4

ewah_pool_newFunction · 0.85
ewah_read_mmapFunction · 0.85
errorFunction · 0.85
ewah_pool_freeFunction · 0.85

Tested by

no test coverage detected