git/alloc.c

/*
 * alloc.c  - specialized allocator for internal objects
 *
 * Copyright (C) 2006 Linus Torvalds
 *
 * The standard malloc/free wastes too much space for objects, partly because
 * it maintains all the allocation infrastructure, but even more because it ends
 * up with maximal alignment because it doesn't know what the object alignment
 * for the new allocation is.
 */
#include "git-compat-util.h"
#include "object.h"
#include "blob.h"
#include "tree.h"
#include "commit.h"
#include "repository.h"
#include "tag.h"
#include "alloc.h"

#define BLOCKING

any_object;

struct alloc_state {};

struct alloc_state *allocate_alloc_state(void)
{}

void clear_alloc_state(struct alloc_state *s)
{}

static inline void *alloc_node(struct alloc_state *s, size_t node_size)
{}

void *alloc_blob_node(struct repository *r)
{}

void *alloc_tree_node(struct repository *r)
{}

void *alloc_tag_node(struct repository *r)
{}

void *alloc_object_node(struct repository *r)
{}

/*
 * The returned count is to be used as an index into commit slabs,
 * that are *NOT* maintained per repository, and that is why a single
 * global counter is used.
 */
static unsigned int alloc_commit_index(void)
{}

void init_commit_node(struct commit *c)
{}

void *alloc_commit_node(struct repository *r)
{}