Take the 2-minute tour ×
Windows Phone Stack Exchange is a question and answer site for enthusiasts and power users of Windows Phone OS. It's 100% free, no registration required.

Assume I have a WP application running, with lots of variables in SDRAM at that moment, and then I press the hardware button that puts the phone in standby (like the one next to the volume control buttons, in a Nokia Lumia 800), or just let the inactivity timeout expire. During that transition (from on to standby), and each time that it happens, does the OS save all the SDRAM contents to the flash of the phone?

With usual flash write endurances of about 100 kcycles, that would mean I can do that action about 55 times/day during 5 years (ignoring other wearing actions).

share|improve this question
add comment

2 Answers 2

During that transition (from on to standby), and each time that it happens, does the OS save all the SDRAM contents to the flash of the phone?

Yes, it does if the developer decided to support saving the state the application was in. In Microsoft developer terms this is referred to as Tombstoning. Read more about it in the Execution Model Overview for Windows Phone. Your specific occasion was confirmed by Microsoft Employees.

share|improve this answer
    
Yes, I know about tombstoning, but I would say that even if the code does not explicitly save anything into the isolated storage or the State dictionary, the phone retains some (if not all) of the RAM contents. I've written applications, I've disabled temporarily the saving functionality, and it still retains some visual state of my app, when going into and coming out of standby. I guess that also went to the flash. –  Telaclavo Apr 25 '12 at 15:22
    
@Telaclavo: That's how Standby is defined, it's a low-power mode that retains CPU / Memory functionality. But the state (if supported by developer) is written away to the SDRAM (regardless standby) to make room for starting other applications. It would make no sense to write away the GUI state, which can simply be retained (and is necessary for when you hold the back button) until memory is needed (in which it kills the tombstoned application). Does this make it clear? –  Tom Wijsman Apr 25 '12 at 15:30
    
With your sentence "[standby] is a low-power mode that retains [...] Memory functionality" are you suggesting that the SDRAM contents is retained during standby? –  Telaclavo Apr 25 '12 at 15:41
    
@Telaclavo: Oops, I meant Flash there. (SD seems to have confused me for a small moment) –  Tom Wijsman Apr 25 '12 at 15:43
add comment

With usual flash write endurances of about 100 kcycles, that would mean I can do that action about 55 times/day during 5 years (ignoring other wearing actions).

That calculation assumes, that every 55 times a day, data is written into same cells. There are some wear-algorithms that should ensure that cells are used equally.

So it is possible that every 55 times a day data is written into different cells - that would mean only 1 cycle a day. That would end in 250 years of doing that transition :)

Another interpretation could be that you rewrites your whole flash 55 times a day.

But I am not a hardware person, so I may be mistaken.

Besides, even those five years would be enough nowadays, wouldn't it? :)

share|improve this answer
    
Right, it's not that I'm concerned. I'm just curious. And yes, I know about the wear-leveling algorithms, though I don't know if this OS(/file system) uses them. –  Telaclavo Apr 25 '12 at 15:37
    
That's right. I knew you didn't asked this, but wanted to be clear, that this shouldn't be an issue (shouldn't). But this is nice subject for next question :) –  jumbo Apr 25 '12 at 15:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.