eglDestroySurface() doesn’t free memory on LinuxPC

This topic contains 2 replies, has 3 voices, and was last updated by  ptj 9 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29527

    TomCooksey
    Member

    I’ve been trying to track down a memory leak & found it is due to the fact that eglDestroySurface() doesn’t release any memory.

    I do the following:

    1) Create and map an X window

    2) Create a window surface for the X window

    3) Create a context for the window surface

    4) Make the window’s context current

    5) Create a pbuffer surface

    6) Create a context for that pbuffer surface

    7) Make the pbuffer context current (with the pbuffer surface)

    8) glClear(GL_COLOR_BUFFER_BIT)

    9) Make the window’s context current again (with window surface)

    10) Delete the pbuffer context

    11) Delete the pbuffer surface

    12) repeat 5-11

    It doesn’t matter how large the pbuffer is, eglCreatePBufferSurface always allocates ~1.1M, so the VmRss & VmSize both increase by 1.1M each time I create & destroy a pbuffer. After a few seconds the program aborts with:

    “X Error of failed request: BadAlloc (insufficient resources for operation)”

    I can post some example code, if required.

    #32107

    Xmas
    Member

    Hi Tom,

    thanks for reporting this. We’re looking into the problem.

    #32108

    ptj
    Member

    Hi Tom,

    Thank you very much for this detailed report, I’ll take a look at it and try to fix it before the next release.

    Peter

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.