X86 linux - how to create custom malloc with address hint
I want to create a custom malloc that allocates blocks of memory within a given address range.
I am writing a pthreads application in which threads are bound to unique cores on a multi-core machine. Memory controllers are statically mapped so that a specific range of addresses in main memory are electrically closer to the core. I want to minimize communication latency between cores and main memory by allocating thread memory in these "closer" regions.
Any ideas would be most appreciated. Thanks! Nandu
+2
a source to share