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

Function alloc_objects

builtin/fast-import.c:474–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472#endif
473
474static void alloc_objects(unsigned int cnt)
475{
476 struct object_entry_pool *b;
477
478 b = xmalloc(sizeof(struct object_entry_pool)
479 + cnt * sizeof(struct object_entry));
480 b->next_pool = blocks;
481 b->next_free = b->entries;
482 b->end = b->entries + cnt;
483 blocks = b;
484 alloc_count += cnt;
485}
486
487static struct object_entry *new_object(struct object_id *oid)
488{

Callers 2

new_objectFunction · 0.85
cmd_fast_importFunction · 0.85

Calls 1

xmallocFunction · 0.50

Tested by

no test coverage detected