An Optimal Allocation of Memory Buffers for Complex Multicore Platforms