I have a memory heap manager which partitions the heap into different segments based on the number of processors on the system. Memory can only be allocated on the partitio
This design smells bad to me. You seem to be making the assumption that a thread will stay associated with a specific CPU. That is not guaranteed. Yes, a thread may normally stay on a single CPU, but it doesn't have to, and eventually your program will have a thread that switches CPU's. It may not happen often, but eventually it will. If your design doesn't take this into account, then you will mostly likely eventually hit some sort of hard to trace bug.
Let me ask this question, what happens if memory is allocated on one CPU and freed on another? How will your heap handle that?