<commit_before>#ifndef HAL_MM_MEMORY_H
#define HAL_MM_MEMORY_H

typedef struct {
	unsigned int present : 1;
	unsigned int readwrite : 1;
	unsigned int user : 1;
	unsigned int writethrough : 1;
	unsigned int cachedisable : 1;
	unsigned int accessed : 1;
	unsigned int dirty : 1;
	unsigned int attributeindex : 1;
	unsigned int global : 1;
	unsigned int reserved : 3;
	unsigned int address : 20;
} PageTableEntry;

typedef struct {
	unsigned int present : 1;
	unsigned int readwrite : 1;
	unsigned int user : 1;
	unsigned int writethrough : 1;
	unsigned int cachedisable : 1;
	unsigned int accessed : 1;
	unsigned int available : 1;
	unsigned int pagesize : 1;
	unsigned int global : 1;
	unsigned int reserved : 3;
	unsigned int address : 20;
} PageDirEntry;

#define MALLOC_ALIGN 1

void *kmalloc_int(unsigned int size, unsigned int flags);
void *kmalloc(unsigned int nbytes);
void free(void *ap);

void init_mm();
unsigned int test_frame(unsigned int addr);
void set_frame(unsigned int addr);
unsigned int first_frame();

unsigned int end_memory;

#endif /* end of include guard: HAL_MM_MEMORY_H */
<commit_msg>Removed duplicate declaration of free()<commit_after>#ifndef HAL_MM_MEMORY_H
#define HAL_MM_MEMORY_H

#include <stdlib.h>

typedef struct {
	unsigned int present : 1;
	unsigned int readwrite : 1;
	unsigned int user : 1;
	unsigned int writethrough : 1;
	unsigned int cachedisable : 1;
	unsigned int accessed : 1;
	unsigned int dirty : 1;
	unsigned int attributeindex : 1;
	unsigned int global : 1;
	unsigned int reserved : 3;
	unsigned int address : 20;
} PageTableEntry;

typedef struct {
	unsigned int present : 1;
	unsigned int readwrite : 1;
	unsigned int user : 1;
	unsigned int writethrough : 1;
	unsigned int cachedisable : 1;
	unsigned int accessed : 1;
	unsigned int available : 1;
	unsigned int pagesize : 1;
	unsigned int global : 1;
	unsigned int reserved : 3;
	unsigned int address : 20;
} PageDirEntry;

#define MALLOC_ALIGN 1

void *kmalloc_int(unsigned int size, unsigned int flags);
void *kmalloc(unsigned int nbytes);

void init_mm();
unsigned int test_frame(unsigned int addr);
void set_frame(unsigned int addr);
unsigned int first_frame();

unsigned int end_memory;

#endif /* end of include guard: HAL_MM_MEMORY_H */

{'fraction_non_alphanumeric': 0.0791814946619217, 'fraction_numerical': 0.02224199288256228, 'mean_word_length': 4.6225, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '4986618', 'n_tokens_mistral': 761, 'n_tokens_neox': 703, 'n_words': 279}