Using OMAP SDK 4.05.00-03 on DM3730, I notice that multiple eglCreateImageKHR/eglDestroyImageKHR (type EGL_NATIVE_PIXMAP_KHR) leads to memory leak.
And after 36 eglCreateImageKHR/eglDestroyImageKHR, eglCreateImageKHR return an error 0x300c (EGL_BAD_PARAMETER).
It looks as if eglDestroyImageKHR does not do any desallocation.
Here below the loop I tested:
for (i=0; i< NB_REPEAT; i++) {
mDrawable = 0; mDrawable = XCreatePixmap(x11Display, x11Window, disp_w, disp_h, depth); if (!mDrawable) printf("XCreatePixmap failed!\n"); else printf("loop %d drawable = %d\n",i,mDrawable); XSync(x11Display, False); //create an KHR image khrImage = 0; khrImage = peglCreateImageKHR(dpy, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, mDrawable, NULL); if((!khrImage) || (err = eglGetError()) != EGL_SUCCESS){ printf("Error after peglCreateImageKHR!, error = %x\n", err); } else { printf("peglCreateImageKHR Success! \n"); } XFreePixmap (x11Display, mDrawable); XSync(x11Display, False); peglDestroyImageKHR(dpy, khrImage);
if((err = eglGetError()) != EGL_SUCCESS){ printf("Error after peglDestroyImageKHR!, error = %x\n", err); } else { printf("peglDestroyImageKHR Success! \n"); } }
Why is the virtual memory size of the process increasing during this loop ? It isn't if no EGLImageKHR is created but only the pixmaps.
Why does eglCreateImageKHR fail (with error 0x300c) after 36 iterations ?
Thank you for your answers.
Output of script sgxperf_check.sh on our plateform:
~ # sgxperf_check.shWSEGL settings[default]WindowSystem=libpvrPVR2D_DRIWSEGL.soDisableHWTextureUpload=1------ARM CPU informationProcessor : ARMv7 Processor rev 2 (v7l)BogoMIPS : 912.72Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3CPU implementer : 0x41CPU architecture: 7CPU variant : 0x3CPU part : 0xc08CPU revision : 2Hardware : OMAP3 Bsm200 BoardRevision : 0020Serial : 0000000000000000------SGX driver informationVersion 1.6.16.4117 (release) /usr/software/embedded-systems/subsystems/ti/omap/sdk/4.05.00-03/build-innes.playzilla-and-elinux.sm2/GFX_Linux_KMSystem Version String: SGX revision = 1.2.5------Framebuffer settings------Rotation settings0------Kernel Module informationsierra 8125 0 - Live 0xbf158000libertas_sdio 7919 0 - Live 0xbf150000libertas 55044 1 libertas_sdio, Live 0xbf139000bufferclass_ti 4978 0 - Live 0xbf132000pvrsrvkm 163978 3 bufferclass_ti, Live 0xbf0f9000drm 137309 3 pvrsrvkm, Live 0xbf0c3000cmemk 21002 0 - Live 0xbf0b7000lpm_omap3530 6381 0 - Live 0xbf0af000dsplinkk 122621 1 lpm_omap3530, Live 0xbf083000omap_vout 17448 0 - Live 0xbf077000omap3_isp 90844 0 - Live 0xbf055000videobuf_dma_contig 3234 1 omap_vout, Live 0xbf04f000videobuf_core 13997 2 omap_vout,videobuf_dma_contig, Live 0xbf045000omapfb 24671 2 - Live 0xbf038000panel_sharp_ls037v7dw01 2069 0 - Live 0xbf032000generic_bl 1783 0 - Live 0xbf02c000panel_generic 1655 1 - Live 0xbf026000omapdss 98581 4 omap_vout,omapfb,panel_sharp_ls037v7dw01,panel_generic, Live 0xbf000000------Boot settingssmsc95xx.mac=00ffd20d7a04 psn=00000-00004 console=ttyO0,115200n8 consoleblank=0mpurate=auto mem=414M@0x80000000 root=/dev/mmcblk0p3 rw rootfstype=ext4 rootwait------Linux Kernel versionLinux sma200 2.6.37-INNES_patched #1 Mon Jan 23 12:04:20 CET 2012 armv7l GNU/Linux
Seems that the latest graphics SDK Release engineering drop 04.06.00.01 that fixes this issue. Please give it a try.
I confirm that SDK 04.06.00.01 fixes the issue. Thank you.
But is this version official ? Many libraries (for example in gfx_rel_es5.x directory) are very smaller than in SDK 04.05.00.03. Why ?
Hi,
Thanks for the confirmation that 04.06.00.01 fixes the issue. We have the graphics SDK 04.06.00.01 official version available for download at -
http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html
Also as mentioned/already confirmed by you above , can you please close this query by clicking on verify answer for this post?
Thanks,
Prathap.
If my reply answers your question then please click on the "Verify Answer" button.
Can you please mark the above post as verified answer as it will help/benefit other users when they run into similar problem.