<commit_before>#if !defined(PARROT_SMALLOBJECT_H_GUARD)
#define PARROT_SMALLOBJECT_H_GUARD

#include "parrot/parrot.h"

struct Small_Object_Arena {
    size_t used;
    size_t total_objects;
    struct Small_Object_Arena *prev;
    struct Small_Object_Arena *next;
    void *start_objects;
};

/* Tracked resource pool */
struct Small_Object_Pool {
    struct Small_Object_Arena *last_Arena;
    size_t object_size;     /* size in bytes of an individual pool item */
    size_t objects_per_alloc; 
    size_t total_objects;
    size_t num_free_objects;    /* number of resources in the free pool */
    size_t replenish_level;
    void *free_list;
    UINTVAL align_1;    /* alignment (must be power of 2) minus one */
    /* adds a free object to the pool's free list  */
    void  (*add_free_object)(struct Parrot_Interp *, 
                             struct Small_Object_Pool *, void *);
    /* gets and removes a free object from the pool's free list */
    void *(*get_free_object)(struct Parrot_Interp *,
                             struct Small_Object_Pool *);
    /* allocates more objects */
    void  (*alloc_objects)(struct Parrot_Interp *,
                           struct Small_Object_Pool *);
    /* makes more objects available. can call alloc_more_objects */
    void  (*more_objects)(struct Parrot_Interp *,
                              struct Small_Object_Pool *);
    void *mem_pool;
    size_t start_arena_memory;
    size_t end_arena_memory;
};

INTVAL contained_in_pool(struct Parrot_Interp *,
                         struct Small_Object_Pool *, void *);
size_t get_max_pool_address(struct Parrot_Interp *interpreter,
                            struct Small_Object_Pool *pool);
size_t get_min_pool_address(struct Parrot_Interp *interpreter,
                            struct Small_Object_Pool *pool);


void more_traceable_objects(struct Parrot_Interp *interpreter, 
                struct Small_Object_Pool *pool);
void more_non_traceable_objects(struct Parrot_Interp *interpreter, 
                struct Small_Object_Pool *pool);

void add_free_object(struct Parrot_Interp *,
                     struct Small_Object_Pool *, void *);
void *get_free_object(struct Parrot_Interp *,
                      struct Small_Object_Pool *);
void alloc_more_objects(struct Parrot_Interp *,
                        struct Small_Object_Pool *);
struct Small_Object_Pool * new_small_object_pool(struct Parrot_Interp *,
                                                 size_t, size_t);

struct Small_Object_Pool * get_sized_small_object_pool(struct Parrot_Interp *,
                                                       size_t);
void set_sized_small_object_pool(struct Parrot_Interp *, size_t,
                                 struct Small_Object_Pool *);
<commit_msg>Patch below kills a couple of warnings that cropped up because alloc_more_objects was renamed to alloc_objects in the code but not the headers. Also updates the comments.<commit_after>#if !defined(PARROT_SMALLOBJECT_H_GUARD)
#define PARROT_SMALLOBJECT_H_GUARD

#include "parrot/parrot.h"

struct Small_Object_Arena {
    size_t used;
    size_t total_objects;
    struct Small_Object_Arena *prev;
    struct Small_Object_Arena *next;
    void *start_objects;
};

/* Tracked resource pool */
struct Small_Object_Pool {
    struct Small_Object_Arena *last_Arena;
    size_t object_size;     /* size in bytes of an individual pool item */
    size_t objects_per_alloc; 
    size_t total_objects;
    size_t num_free_objects;    /* number of resources in the free pool */
    size_t replenish_level;
    void *free_list;
    UINTVAL align_1;    /* alignment (must be power of 2) minus one */
    /* adds a free object to the pool's free list  */
    void  (*add_free_object)(struct Parrot_Interp *, 
                             struct Small_Object_Pool *, void *);
    /* gets and removes a free object from the pool's free list */
    void *(*get_free_object)(struct Parrot_Interp *,
                             struct Small_Object_Pool *);
    /* allocates more objects */
    void  (*alloc_objects)(struct Parrot_Interp *,
                           struct Small_Object_Pool *);
    /* makes more objects available. can call alloc_objects */
    void  (*more_objects)(struct Parrot_Interp *,
                          struct Small_Object_Pool *);
    void *mem_pool;
    size_t start_arena_memory;
    size_t end_arena_memory;
};

INTVAL contained_in_pool(struct Parrot_Interp *,
                         struct Small_Object_Pool *, void *);
size_t get_max_pool_address(struct Parrot_Interp *interpreter,
                            struct Small_Object_Pool *pool);
size_t get_min_pool_address(struct Parrot_Interp *interpreter,
                            struct Small_Object_Pool *pool);


void more_traceable_objects(struct Parrot_Interp *interpreter, 
                struct Small_Object_Pool *pool);
void more_non_traceable_objects(struct Parrot_Interp *interpreter, 
                struct Small_Object_Pool *pool);

void add_free_object(struct Parrot_Interp *,
                     struct Small_Object_Pool *, void *);
void *get_free_object(struct Parrot_Interp *,
                      struct Small_Object_Pool *);

void alloc_objects(struct Parrot_Interp *, struct Small_Object_Pool *);

struct Small_Object_Pool * new_small_object_pool(struct Parrot_Interp *,
                                                 size_t, size_t);

struct Small_Object_Pool * get_sized_small_object_pool(struct Parrot_Interp *,
                                                       size_t);
void set_sized_small_object_pool(struct Parrot_Interp *, size_t,
                                 struct Small_Object_Pool *);

{'fraction_non_alphanumeric': 0.06707638279192274, 'fraction_numerical': 0.0007023705004389816, 'mean_word_length': 2.5225726654298084, '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': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5774370', 'n_tokens_mistral': 1638, 'n_tokens_neox': 1590, 'n_words': 404}