Hi,
I wanted to know exactly what GUI_NUMBYTES memory is used for.
If i have multiple windows and respective widgets and i always have to increase the memory if any new window is added.
Is there any way to avoid this?
Thanks
Regards,
Anuj
Hi,
I wanted to know exactly what GUI_NUMBYTES memory is used for.
If i have multiple windows and respective widgets and i always have to increase the memory if any new window is added.
Is there any way to avoid this?
Thanks
Regards,
Anuj
Hi,
The memory allocated with the function GUI_ALLOC_AssignMemory() in GUI_X_Config() is used to allocate memory for anything emWin needs memory for.
This can be:
Windows
Widgets
Memory Devices
Driver memory (except the frame buffer of GUIDRV_Lin)
Driver context structure
QR codes
Any special devices (Rotation, Alpha, ...)
I'm pretty sure I have forgot something but it should give you an idea about which things need memory from this memory pool.
You could increase the memory that everything is running properly. Once finished you can call GUI_ALLOC_GetMaxUsedBytes() and play with your application. After some time set a breakpoint on this function call and check the return value. This will be the maximum number of bytes used by your application. Now you can reduce teh memory allocated for emWin to the functions return value (plus some addition bytes to be on the save side).
Regards,
Sven
Hello,
Thanks for the information.
Regards,
Anuj
Don’t have an account yet? Register yourself now and be a part of our community!