Here a test example: http://dpaste.1azy.net/2cfc8ead The memory is allocated through the SDL as you can see.