Below is a simple test that fails for me on the debug build.
I get the error:
[foonathan::memory] Assertion failure in function allocate (.../foonathan-memory/src/detail/free_list.cpp:444): Assertion "last_dealloc_prev_ == prev" failed.
I am not sure if this is a genuine error that the debug build is detecting, or if it is an error introduced by the different behavior present in debug builds...
typedef foonathan::memory::memory_pool<> MyPool;
MyPool pool(100, 1024);
auto p1 = pool.allocate_node();
auto p2 = pool.allocate_node();
pool.deallocate_node(p1);
pool.deallocate_node(p2);
p1 = pool.allocate_node();
p2 = pool.allocate_node(); // <-- assertion happens here
pool.deallocate_node(p1);
pool.deallocate_node(p2);