As part of an assignment we have to implement a (basic) malloc function(we should somehow simulate dynamic memory allocation). I already implemented a solution based on implicit free list,but the problem is that i get a utilization of 50% and a throughput of 9% only(I have to get a 90% utilization+throughput). The problem with implicit free list is that it takes alot of time searching for free blocks. So i wanted to implement explicit free list to see how much can the program improve. now the problem is that i have to keep track of next/prev pointers for free blocks. And since I can only use scalar variables and cannot use any kind of data structures e.g:linked list,struct,.., i couldnt implement it. Can someone point out how can i keep track of (virtual) pointers in C?
thanks,