Optimal spare utilization in repairable and reliable memory cores