Memory consumption problem after migrating to SDL2

Hello everyone,

I am new to the forum, and more generally in SDL, so I hope you can be patient with me.

I am working on a big project and we recently migrated to SDL2. After the migration, the usage of memory by the program is huge. To give you some numbers, when the program was running on SDL1 its was using around 40 max 60 MB’s and now its starting at 1.35 GB’s and going as far as 1.6 GB’s with the only change being the SDL2.

Looking in to the program for memory leaks or other issues, what i have found is that all the memory is being used by the rendering processes. When I draw the “Content” thats when it takes up all the memory.

So my questions are the following:

 - Does it have to do something with the way you render in SDL2?
 - Should I change and find a way to render more directly with OpenGL?
 - Is it common? (Cause it seams really weird to me, when most people use it for game development)

P.S. Unfortunately I cannot share the code with you due to the code being company property. But I can tell you the way I am rendering etc.

Thank you in advance.

My super simple test application (rendering texts using FreeType2 and Harfbuzz) use ~16MB of memory.

Are you sure it’s SDL2? Have you change anything apart from your code and SDL2 ? It’s probably the debugging process or anything …