A computer system includes a processor, and a memory controller electrically connected to the processor and the memory for controlling the accessing operations of the memory. The method includes the processor generating a predetermined logic value and delivering the predetermined logic value to the memory controller, and the memory controller repeatedly overwriting data stored in the plurality of memory units by the predetermined logic value.