Hi Adrian,
I have noticed something strange with the memory allocation of emWin, please can you let me know if this is a problem or not.
I am using the following code in my background GUI task to monitor the memory usage:
static void
GUIBackgroundTask(void)
{
WM_SetDesktopColor(GUI_BLACK);
WM_SetCallback(WM_HBKWIN, _cbBackgroundWin);
while(1)
{
GUI_Exec(); /* Do the background work ... Update windows etc. */
GUI_X_ExecIdle(); /* Nothing left to do for the moment ... Idle processing */
GUIFreeBytes = GUI_ALLOC_GetNumFreeBytes();
GUIUsedBytes = GUI_ALLOC_GetNumUsedBytes();
GUIFreeBlocks = GUI_ALLOC_GetNumFreeBlocks();
GUIUsedBlocks = GUI_ALLOC_GetNumUsedBlocks();
}
}
I have noticed then when I open a dilaog box, the memory usage increases (as one would expect), but when I close this dialog box the free memory does not return to the same amount before the window was created - it is less, yet the used memory and used blocks increase.
If I continuously open and close this dialog window the used blocks and used bytes always gets bigger with each iteration.
eg:
before the dialog is opened:
GUIFreeBytes = 748272
GUIUsedBytes = 11827164
GUIFreeBlocks = 94
GUIUsedBlocks = 92429
after the dialog is closed:
GUIFreeBytes = 748376
GUIUsedBytes = 11827008
GUIFreeBlocks = 96
GUIUsedBlocks = 92427
I this behavior correct, or is emWin gradually running out of its memory pool?
Please can you also let me know about the question I posted sometime ago regarding the error message when an item is disabled in a dropdown box widget.
Thanks!
I have noticed something strange with the memory allocation of emWin, please can you let me know if this is a problem or not.
I am using the following code in my background GUI task to monitor the memory usage:
static void
GUIBackgroundTask(void)
{
WM_SetDesktopColor(GUI_BLACK);
WM_SetCallback(WM_HBKWIN, _cbBackgroundWin);
while(1)
{
GUI_Exec(); /* Do the background work ... Update windows etc. */
GUI_X_ExecIdle(); /* Nothing left to do for the moment ... Idle processing */
GUIFreeBytes = GUI_ALLOC_GetNumFreeBytes();
GUIUsedBytes = GUI_ALLOC_GetNumUsedBytes();
GUIFreeBlocks = GUI_ALLOC_GetNumFreeBlocks();
GUIUsedBlocks = GUI_ALLOC_GetNumUsedBlocks();
}
}
I have noticed then when I open a dilaog box, the memory usage increases (as one would expect), but when I close this dialog box the free memory does not return to the same amount before the window was created - it is less, yet the used memory and used blocks increase.
If I continuously open and close this dialog window the used blocks and used bytes always gets bigger with each iteration.
eg:
before the dialog is opened:
GUIFreeBytes = 748272
GUIUsedBytes = 11827164
GUIFreeBlocks = 94
GUIUsedBlocks = 92429
after the dialog is closed:
GUIFreeBytes = 748376
GUIUsedBytes = 11827008
GUIFreeBlocks = 96
GUIUsedBlocks = 92427
I this behavior correct, or is emWin gradually running out of its memory pool?
Please can you also let me know about the question I posted sometime ago regarding the error message when an item is disabled in a dropdown box widget.
Thanks!