Evaluating heap_5 performance and memory overhead


I’m looking for a code that “exhausts” heap_5, I would like to check for performance and speed and memory overhead (allocations and deallocations) in order to evaluate it for my use, I found a few examples online of benchmarks of memory allocators and wrote a simple code, but I was wondering if there’s a reference code for heap_5 specifically.

Thank you,

No, there is not any special benchmark test suite.

Are you able to make those work?

When I first tried heap_[45].c, I found that they’re extremely fast, and more importantly: they work as they should.

What I did is allocate random blocks of memory of varying sizes, while also freeing allocated blocks in a random order. So now and then, the program would free all allocated blocks.
During all operations, it would check “the number of free bytes”.

I ran it on a fast laptop for couple days. All went as expected.

Often I use heap_5.c because the actual free space is only known at runtime. I put some markers in the linker file, which are turned into pseudo variables in the code:

    extern uint8_t __bss_end__, _estack
    #define HEAP_START		__bss_end__
    #define HEAP_END		_estack

I have not stored the testing application. But the algorithm hasn’t changed since then.

Yes, I can do the evaluation I need through them, thank you

Thank you, I’ll look into this