Okay, i disabled the code in gui_osd_draw_zebra() unter the zebra_init() call (which allocates the memory):
int gui_osd_draw_zebra(int show) {
unsigned int v, s, x, y, f, over;
color cl_under=conf.zebra_color>>8, cl_over=conf.zebra_color&0xFF;
static int need_restore=0;
int viewport_height;
int viewport_width;
int mrec = ((mode_get()&MODE_MASK) == MODE_REC);
int zebra_drawn=0;
color cls[] = {
COLOR_TRANSPARENT,
(mrec)?COLOR_HISTO_B:COLOR_HISTO_B_PLAY,
(mrec)?COLOR_HISTO_G:COLOR_HISTO_G_PLAY,
(mrec)?COLOR_HISTO_BG:COLOR_HISTO_BG_PLAY,
(mrec)?COLOR_HISTO_R:COLOR_HISTO_R_PLAY,
(mrec)?COLOR_HISTO_RB:COLOR_HISTO_RB_PLAY,
(mrec)?COLOR_HISTO_RG:COLOR_HISTO_RG_PLAY,
COLOR_BLACK
};
if (!gui_osd_zebra_init(show))
return 0;
#if 0 <------------------------------------------------------------- code disabled.
if(timer==0) {
draw_guard_pixel();
timer=1;
return 0;
....
}
Then i checked the memory usage after pressing the shutter half in a over exposed picture situation.
Free memory stays arround 87xxxx.
Then i also disabled one of the free() calls (free(buf) ; ) in gui_osd_zebra_free(), to see what happens.
Camera still works stable, but with every halfpress shutter, the memory goes lower (as expected) in this steps:
880672
650224
419808
189392
Update: As is see in my code, i did this measurement with a viewportsize width of 480 (and not with 720).