a pure c code, write a cycle memory manager demo with constant size