Using Dynamic Allocation of Write Voltage to Extend Flash Memory Lifetime