When:
init_mempool(0x0000, 1024); p = malloc(10);
init_mempool(0x2000, 1024); p = malloc(10);
Yes. When I try to modify the source code of init_mempool to provide the function reserving the memory heap, it's obvious that I can't accomplish that, just as what you've pointed out.