Quoting David C. Jedynak: > Is there a way to find out how much memory is left in the videoonly heap > before setting up a surface in it? I'm pretty tight on VRAM space, and I > was wondering if there was a simple way to find out how much room was > left, from within runtime code of a directfb application, so I can protect > against errors and fail gracefully (like setting a surface in system > instead of video, but at a performance penalty) rather than dying.
Hi, I can add a way to query the amount of free RAM, but it wouldn't be a definitive answer. Allocation might still fail if the free space is too fragmented. Defragmentation of free space by moving surface buffers around (using hw) has to be implemented in the surface manager which I'd like to rewrite before adding this feature. Anyways, your application shouldn't die if creation of a video only surface fails. If you encounter a crash or any other bug in DirectFB related to failing creation of video only surfaces, please tell us. -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" Convergence GmbH
