Having fun with the memory dump. - General Discussion and Assistance - CHDK Forum  

Having fun with the memory dump.

  • 5 Replies
  • 3097 Views
*

Offline RaduP

  • *****
  • 926
Having fun with the memory dump.
« on: 25 / September / 2009, 04:05:22 »
Advertisements
Ok, so since I am not able to do much because of file i/o options, I am playing with the memory dump function.
This way, I was able to determine that there is a JPEG buffer, and find out the address too. I am going to try to find the raw and video buffer this way as well.
If thing go bad and can't get CHDK to run, I plan to make a 'lite' version, that only adds raw mode and maybe manual controls.

*

Offline RaduP

  • *****
  • 926
Re: Having fun with the memory dump.
« Reply #1 on: 25 / September / 2009, 04:57:51 »
What is even more interesting is the fact that there are fragments of other JPEGs in the memory, some that I took like 10 days ago, even though I removed the battery many times.
It may also be that the JPEG buffer is actually dynamic, maybe by using malloc or something.

*

Offline reyalp

  • ******
  • 14117
Re: Having fun with the memory dump.
« Reply #2 on: 25 / September / 2009, 05:12:57 »
What is even more interesting is the fact that there are fragments of other JPEGs in the memory, some that I took like 10 days ago, even though I removed the battery many times.
I'd guess this is for playback ?
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 926
Re: Having fun with the memory dump.
« Reply #3 on: 25 / September / 2009, 05:19:48 »
It's the whole file, not just a preview. Almost 2mb. So I don't think it's for preview.
Oh, you might be right, it might be the last image, that gets displayed when the camera is turned on in playback mode. Even so, it seems a waste of memory to keep the whole file in memory like that. If that's what it is, I wonder if the camera reloads it from the SD card each time the battery is removed, or if the memory can survive for a while without a battery.

Anyway, if that is indeed the jpeg that gets displayed when the camera is turned on in playback mode, it is interesting that it's at the same location in the dump, even after a photo is taken. This suggest that either this is a specially reserved memory for it, or that malloc somehow remembers that this location is in use, even after a restart (which I find unlikely).
Another question is, is this image loaded every time the camera starts in playback mode, or does it stay in the memory? When I wake up, I'll do some tests, such as corrupting the memory there and see what happens :D
« Last Edit: 25 / September / 2009, 05:26:51 by RaduP »


*

Offline reyalp

  • ******
  • 14117
Re: Having fun with the memory dump.
« Reply #4 on: 25 / September / 2009, 05:25:44 »
It's the whole file, not just a preview. Almost 2mb. So I don't think it's for preview.
Oh, you might be right, it might be the last image, that gets displayed when the camera is turned on in playback mode.
Just because you see it in memory doesn't mean it hasn't been freed.
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 926
Re: Having fun with the memory dump.
« Reply #5 on: 25 / September / 2009, 05:27:30 »
Yeah, I edited my post while you replied.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal