1.拍摄后进行内存释放

This commit is contained in:
payton 2024-01-03 16:42:11 +08:00
parent cf35d5a560
commit 637119f1ac
6 changed files with 20 additions and 12 deletions

View File

@ -2,7 +2,9 @@
#include "PrjInc.h"
#include "Mode/UIModePhoto.h"
#if HUNTING_CAMERA_MCU == ENABLE
#include "sf_common.h"
#endif
#if(WIFI_FUNC==ENABLE)
#include "UIModeWifi.h"
#endif
@ -58,6 +60,10 @@ void ModePhoto_Open(void)
}
}
#endif
#if HUNTING_CAMERA_MCU == ENABLE
sf_mem_free();
#endif
#endif
}
void ModePhoto_Close(void)

View File

@ -409,10 +409,7 @@ INT32 System_OnBoot(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
}
#endif
#if HUNTING_CAMERA_MCU == ENABLE
printf("[%s]:%d sf s\n", __FUNCTION__, __LINE__);
system("sync");
system("echo 3 >/proc/sys/vm/drop_caches");
printf("[%s]:%d sf e\n", __FUNCTION__, __LINE__);
sf_mem_free();
#endif
return NVTEVT_CONSUME;
}

View File

@ -949,12 +949,7 @@ static void UIFlowMenuCommonItem_ScrOpen(lv_obj_t* obj)
gMenuLuck = MENU_UNLUCK;
#if HUNTING_CAMERA_MCU == ENABLE
sf_set_menu_open(TRUE);
printf("[%s]:%d sf s\n", __FUNCTION__, __LINE__);
system("sync");
system("echo 3 >/proc/sys/vm/drop_caches");
printf("[%s]:%d sf e\n", __FUNCTION__, __LINE__);
sf_mem_free();
#endif
}

View File

@ -1797,6 +1797,7 @@ void UIFlowPhoto_UpdateInfo(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg)
{
sf_wifi_server_stop_shoot_respond(0);
}
sf_mem_free();
}
#if HUNTING_CAMERA_MCU == ENABLE
sf_set_cap_statu(FALSE);

View File

@ -204,4 +204,5 @@ UINT8 sf_get_net_generation(void);
void sf_set_net_generation(UINT8 value);
UINT32 sf_cardv_load_menu_info_start(void);
BOOL sf_vos_perf_list_dump(unsigned char argc, char **argv);
void sf_mem_free(void);
#endif

View File

@ -3499,3 +3499,11 @@ BOOL sf_vos_perf_list_dump(unsigned char argc, char **argv)
system("dmesg");
return TRUE;
}
void sf_mem_free(void)
{
printf("[%s]:%d sf s\n", __FUNCTION__, __LINE__);
system("sync");
system("echo 3 >/proc/sys/vm/drop_caches");
printf("[%s]:%d sf e\n", __FUNCTION__, __LINE__);
}