
// the following macro is used to convert all memory requests to multiple of 16 bytes since each mblock struct needs 16 bytes
#define	roundmb(x)	( (15 + (unsigned int)(x)) & ~15 )
/*The structure used to represent one memory block. Used to represent free list*/
struct mblock{
	unsigned int length;
	struct mblock *next;
};

//enums
enum color 
{
	COLOR_0, COLOR_1, COLOR_2, COLOR_3, COLOR_4, COLOR_5, COLOR_6, COLOR_7, COLOR_8, COLOR_9, COLOR_10, COLOR_11, COLOR_12, COLOR_13,COLOR_14,COLOR_15
};

//function prototypes 

void * tlb_malloc(unsigned int nbytes, enum color color_needed);
void tlb_free(void * addr, enum color color_needed);
void init_tlb_malloc_lib(unsigned int _4k_no_of_dtlb_sets, unsigned int _4k_dtlb_assoc, unsigned int _2m_dtlb_assoc, unsigned int _2m_no_of_dtlb_sets, unsigned int _4k_no_of_dtlb_sets_for_array, unsigned int _2m_no_of_dtlb_sets_for_array, unsigned int _assoc_multiplier);

