Discussion:
How to deallocate Blob memory in IM
Shantanu Daithankar
2010-06-18 08:21:07 UTC
Permalink
Hi,

I am using IM with OpenGL for generating textures from images of various
formats. For doing this I am using RGBA "Blob's" and through them I build GL
mipmaps to get them rendered. All works fine till this point but due to
limitations on main memory space(the images are huge), I need to deallocate
and free up space by clearing the used blobs. I looked around and found no
methos to do this deletion of Blobs.

Can someone please tell me how I can accomplish this?.

Any suggestions with actual code examples would be awesome as I am very
short on time and this is urgent.

Thanks!

-Shantanu
Shantanu Daithankar
2010-06-28 05:42:30 UTC
Permalink
Hello!!
Anyone out there has any ideas how to delete memory used by Blobs?...

On Fri, Jun 18, 2010 at 1:51 PM, Shantanu Daithankar <
Post by Shantanu Daithankar
Hi,
I am using IM with OpenGL for generating textures from images of various
formats. For doing this I am using RGBA "Blob's" and through them I build GL
mipmaps to get them rendered. All works fine till this point but due to
limitations on main memory space(the images are huge), I need to deallocate
and free up space by clearing the used blobs. I looked around and found no
methos to do this deletion of Blobs.
Can someone please tell me how I can accomplish this?.
Any suggestions with actual code examples would be awesome as I am very
short on time and this is urgent.
Thanks!
-Shantanu
Anthony Thyssen
2010-06-28 06:22:00 UTC
Permalink
On Mon, 28 Jun 2010 11:12:30 +0530
magick-users-***@imagemagick.org wrote:
| Hello!!
| Anyone out there has any ideas how to delete memory used by Blobs?...
|
| On Fri, Jun 18, 2010 at 1:51 PM, Shantanu Daithankar <
| ***@cameoml.com> wrote:
|
| > Hi,
| >
| > I am using IM with OpenGL for generating textures from images of various
| > formats. For doing this I am using RGBA "Blob's" and through them I build GL
| > mipmaps to get them rendered. All works fine till this point but due to
| > limitations on main memory space(the images are huge), I need to deallocate
| > and free up space by clearing the used blobs. I looked around and found no
| > methos to do this deletion of Blobs.
| >
| > Can someone please tell me how I can accomplish this?.
| >
| > Any suggestions with actual code examples would be awesome as I am very
| > short on time and this is urgent.
| >
| > Thanks!
| >
| > -Shantanu
| >
| _______________________________________________
| Magick-users mailing list
| Magick-***@imagemagick.org
| http://studio.imagemagick.org/mailman/listinfo/magick-users


Generally if you supplied the blob (blob to image) no problem you own it
so you free it.

Having a quick look at the headers I see a function called DestroyBlob()
"blob.h", so that would be the logical function to use.

Going deeper I can see that the blobs generated by the library
("blob.c" were allocated using AcquireAlignedMemory()
and destory by the corresponding function (after many checks) using
RelinquishAlignedMemory()

However (after some basic checks) that is just a normal free()

Use the highest level you have access too.


Anthony Thyssen ( System Programmer ) <***@griffith.edu.au>
--------------------------------------------------------------------------
"Specialisation is for insects." -- Robert Heinlein.
--------------------------------------------------------------------------
Anthony's Castle http://www.cit.griffith.edu.au/~anthony/

Loading...