Search code examples
iphonehardwarevideo-capture

How many Program/Erase cycles does the iPhone's flash memory have?


Not sure that this is the right site for this question, but since there are many smart people here maybe someone knows.

I'm building an app that needs to capture video continuously, but keep only the last few minutes (say 5~15). It is easy to implement this by splitting the video to 30-seconds files, and delete the least recent ones. However, this means that the app writes and erases large files all the time, and I'm worried that it'll wear the device's flash memory.

I've been trying to find the P/E cycles spec for the iPhone (and for popular Android phones), with no success. Does anybody know the answer?

P.S. Just to alleviate a trivial concern: the device is connected to power during this video capturing, so battery depletion is not an issue.


Solution

  • I wouldn't worry about that. Typical NAND flash has 100k+ write cycles

    I'm sure iOS has a smart file operating system which distributes writes evenly to reduce wearing out specific locations. I'm also sure that once it starts happening with some sectors it marks them as bad ones and relocates them to healthy locations as it happens with normal HDDs as well.

    Also writing on the same location in every 30 sec is not particularly frequent. It would take you 140 years to wear out the same flash location. I is likely that most of your data stays in the cache without actually ever written to the flash.