<commit_before>#include "extent.h"
#include "debug.h"


/* NOTE: allocations CANNOT result in insertions to the ext tree because tree
 * insertions themselves rely on successful allocation */
uint32_t ext_alloc(uint32_t len) {
	/* traverse the ext tree horizontally and find a free extent that is
	 * large enough */
	
	TODO("remove dummy code");
	return 100;
}

<commit_msg>lib: upgrade the dummy allocation algorithm<commit_after>#include "extent.h"
#include "debug.h"


/* NOTE: allocations CANNOT result in insertions to the ext tree because tree
 * insertions themselves rely on successful allocation */
uint32_t ext_alloc(uint32_t len) {
	/* traverse the ext tree horizontally and find a free extent that is
	 * large enough */
	
	static uint32_t alloc_ptr = 100;
	
	TODO("remove dummy code");
	return alloc_ptr++;
}

/* TODO: look into lazy allocation features of linux for when we have to get
 * zeroed extents (holes) for the library user (or will we just use the
 * read(2)/write(2) convention of filling a user buffer?) */
{'fraction_non_alphanumeric': 0.08325266214908035, 'fraction_numerical': 0.017424975798644726, 'mean_word_length': 4.329896907216495, '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': '6363149', 'n_tokens_mistral': 319, 'n_tokens_neox': 285, 'n_words': 133}