<commit_before>#ifndef ARCH_CACHE_H
#define ARCH_CACHE_H 1
#include "uuid.h"
#include "record.h"

#define ARCH_CACHE_MIN 31
typedef struct arch_cache_bucket {
  arch_uuid_t uuid;
  arch_record_t *record;
  struct arch_cache_bucket *next;
} arch_cache_bucket_t;

typedef struct arch_cache {
  struct arch_cache *old;
  size_t size, entries;
  arch_cache_bucket_t *slots[];
} arch_cache_t;


arch_record_t *arch_cache_get(arch_cache_t *cache, arch_uuid_t uuid);
bool arch_cache_set(arch_cache_t *cache, arch_record_t *record);
#endif<commit_msg>Add allocation helper macro ARCH_CACHE_BYTES()<commit_after>#ifndef ARCH_CACHE_H
#define ARCH_CACHE_H 1
#include "uuid.h"
#include "record.h"

#define ARCH_CACHE_MIN 31
typedef struct arch_cache_bucket {
  arch_uuid_t uuid;
  arch_record_t *record;
  struct arch_cache_bucket *next;
} arch_cache_bucket_t;

typedef struct arch_cache {
  struct arch_cache *old;
  size_t size, entries;
  arch_cache_bucket_t *slots[];
} arch_cache_t;

#define ARCH_CACHE_BYTES(elts) (sizeof(arch_cache_t) + sizeof(arch_cache_bucket_t) * elts)

arch_record_t *arch_cache_get(arch_cache_t *cache, arch_uuid_t uuid);
bool arch_cache_set(arch_cache_t *cache, arch_record_t *record);
#endif
{'fraction_non_alphanumeric': 0.08677685950413223, 'fraction_numerical': 0.0049586776859504135, 'mean_word_length': 7.294520547945205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5424975', 'n_tokens_mistral': 476, 'n_tokens_neox': 466, 'n_words': 100}