A cross-layer approach for new reliability-performance trade-offs in MLC NAND flash memories