Yep, it's called wear leveling.Also, if I'm not mistaken, flash memory intentionally fragments data, spreading it in various places around the cell.
It would take a very long time. This PDF from Corsair explains everything very well: http://www.corsairmemory.com/_faq/FAQ_flash_drive_wear_leveling.pdf^ Thats quite interesting, thanks mate. So if there is a limited time, when would the memory be non-usable? Approx how many years would it take for all the memory to be worn out? What then?
It would take a very long time. This PDF from Corsair explains everything very well: http://www.corsairmemory.com/_faq/FAQ_flash_drive_wear_leveling.pdf
Note the section "Will my Corsair USB Flash drive last more than 10 years?"
Will my Corsair USB Flash drive last
more than 10 years?
Yes. All Corsair flash drives are built with memory
components that can handle AT LEAST 10,000 write
cycles; typically they will handle an order of
magnitude more than this. So, this means that in
order to exhaust the drive in ten years, one would
have to write to EVERY BLOCK in the device about
2.7 times per day, every single day. We simply cant
conceive of such a usage scenario; this would mean
that on a fairly typical 8 GByte drive, one would need
to write over 21 GBytes of data to it every day for ten
years! USB flash drives simply are not used in this
way.
If one thinks he or she might actually try this, we
suggest buying a Corsair Flash Voyager GT or a
Corsair Flash Survivor GT USB drive. They are built
with components guaranteed for 100,000 write
cycles. With these, one can write over 210 GBytes of
data to the drive each day, for ten years!
Since OS X itself doesn't require defrags, and iPhone OS is built off it, I would really doubt it.
That's a good question... (although slowly going off-topic) Why doesn't OSX require defrag? That's a hard drive and not flash drive correct?
Do I need to optimize?
You probably won't need to optimize at all if you use Mac OS X. Here's why:
Hard disk capacity is generally much greater now than a few years ago. With more free space available, the file system doesn't need to fill up every "nook and cranny." Mac OS Extended formatting (HFS Plus) avoids reusing space from deleted files as much as possible, to avoid prematurely filling small areas of recently-freed space.
Mac OS X 10.2 and later includes delayed allocation for Mac OS X Extended-formatted volumes. This allows a number of small allocations to be combined into a single large allocation in one area of the disk.
Fragmentation was often caused by continually appending data to existing files, especially with resource forks. With faster hard drives and better caching, as well as the new application packaging format, many applications simply rewrite the entire file each time. Mac OS X 10.3 Panther can also automatically defragment such slow-growing files. This process is sometimes known as "Hot-File-Adaptive-Clustering."
Aggressive read-ahead and write-behind caching means that minor fragmentation has less effect on perceived system performance.
For these reasons, there is little benefit to defragmenting.
Note:Mac OS X systems use hundreds of thousands of small files, many of which are rarely accessed. Optimizing them can be a major effort for very little practical gain. There is also a chance that one of the files placed in the "hot band" for rapid reads during system startup might be moved during defragmentation, which would decrease performance.
The relevant text for those scared of PDF's
... memory components that can handle AT LEAST 10,000 write cycles; typically they will handle an order of magnitude more than this. So, this means that in order to exhaust the drive in ten years, one would have to write to EVERY BLOCK in the device about 2.7 times per day, every single day...
While I agree that OSX does a great job without needing a defrag, thats not the reason the iPhone doesn't need it. See my post above.
So over time, blocks of the phones memory will go bad or at least become high risk for going bad? Does that mean after 3 or 4 years the phone's OS might start avoiding 10-20% of the hottest memory sectors? Will it gradually lose available memory?