At 6:30 PM -0800 3/10/99, Tom Zerucha wrote:
>How do you get the app in? Hotsync will typically restore lots of things
>you wouldn't want (unless you write that app too).
Restore? So don't restore, just create a 'temp' user. Or beam it in from
another device. Or use the debugger.
>You have to wipe the entire stack too...
Hmmm.. since the stack gets allocated for every app launch, you shouldn't
necessarily have to wipe it. Just make sure that the stack size for your
app is small. But you're right, there is a potential for non-overwritten
memory here.
I suppose you could go back to zeroing over the dynamic heap as a last
step... since you're cold-booting next anyway, a crash won't matter.
Anyway, just syncing and running a few apps will overwrite the dynamic heap
fairly reliably, that's the least of your worries.
>Is it possible to have insufficient memory to create a new heap header, so
>that you can't DmNewHandle, but there would be a section of memory
>untouched?
Yes, that's possible. However, on a cold-booted device you'll be able to
allocate max size chunks (64K - 30 bytes) until there's no room, and
they'll all be back-to-back, then you just do one final allocate to use the
remaining space and there will be no gaps.
>And I think this would apply to the dynamic heap.
It's harder to guarantee filling in all the space there, but then again,
the dynamic heap isn't really much of a worry.
>The problem I have with the architecture is I can't *prove* every byte of
>memory is wiped. It would be helpful if the coldboot-clear memory would
>actually zero all of memory as part of the clear, and it shouldn't take
>that long (I would guess about 1/2 Mb/sec depending on wait states - lp:
>moveq.l #0,(a1)+; dbf d0,lp; dbf d1,lp; and you can see why I would
>like an 68EC010 core).
You want *proof*, huh? You're right, what I described won't prove
anything, it'll just work. :)
Anyway, I can see that a cold boot wouldn't suffer much from actually
writing zeros. I'll see if that's easy to add.
I guess you're back to the disable interrupts and write in a loop hack. :)
--Bob