<commit_before>#pragma once

class memory_manager
{
protected:
	memory_manager(unsigned int memory_size) : memory_size(memory_size) { };
public:
	struct block
	{
		const unsigned int start;
		const unsigned int size;

		block(unsigned int start, unsigned int size) : start(start), size(size) { };
	};

	const unsigned int memory_size;

	virtual block alloc(unsigned int size) = 0;
	virtual void free(block b) = 0;
};<commit_msg>added two comparers for block<commit_after>#pragma once

#include <functional>

class memory_manager
{
protected:
	memory_manager(unsigned int memory_size) : memory_size(memory_size) { };
public:
	struct block
	{
		const unsigned int start;
		const unsigned int size;

		block(unsigned int start, unsigned int size) : start(start), size(size) { };
	};

	const unsigned int memory_size;

	virtual block alloc(unsigned int size) = 0;
	virtual void free(block b) = 0;

	using compare_function = std::function<bool(const block&, const block&)>;

	static bool compare_increasing_size(const block& a, const block& b)
	{
		return a.size < b.size;
	}

	static bool compare_memory_location(const block& a, const block& b)
	{
		return a.start < b.start;
	}
};
{'fraction_non_alphanumeric': 0.10365335598980459, 'fraction_numerical': 0.0033984706881903144, 'mean_word_length': 4.802955665024631, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '2179648', 'n_tokens_mistral': 395, 'n_tokens_neox': 370, 'n_words': 120}