=======Goal======= Write the fastest, most efficient small block allocator (0 to 1024 bytes) =======Official Rules======= - Must support > 1024 allocation - Must be "naturally" aligned to next power of 2, to a maximum of 8 byte alignment - Must be fast - Must be efficient - Must not crash - Must be correct - Must not crash on NULL free - Must support allocation of 0 (return a valid ptr) - Must call blockalloc()/blockfree() for "underlying" pool allocations DO NOT DYNAMICALLY ALLOCATE EXCEPT THROUGH BLOCKALLOC() =======Testing======= Attached is a testbed. The testbed performs three tests: - Basic: allocates random size blocks, then free them all - Partial: allocates some, frees some, allocs some, free them all - Smart: official smartheap performance benchmark - does NOT free all memory at conclusion. The testbed will also perform a correctness check. If you fail, you fail. =======Scoring======= Smaller scores are better. Scoring is based first and foremost on speed. Your score will be biased/discounted by your efficiency. For example, if your efficiency is 100%, your score will be EXACTLY your time. The worse your efficiency, the higher your score will be compared to your raw time Efficiency is measured as percent difference form currently requested total to currently allocated total (as reported by blockalloc()) Smartheap test counts double for efficiency. There is a number called "Score". That is your score. It is NOT normalized for machine/CPU. =======Columns======= e1 is your efficiency (allocated/req) req is the amount the benchmark has requested balloc is the amount YOU requested from blockalloc() That is all.