What kind of file is it?
There are a few file formats that we support for completeness, but at the time
we implemented them we figured they were rarely used and not likely to be used
for huge files, and so we went for a really simple implementation wherein we
just read the whole file into memory and dole out scanlines as required (but
the memory footprint is for the whole file). We've gone back and fixed several
of those, but it's possible that you're using one we never got to.
It's also possible that for a particular file format, even if we appear to be
asking for a scanline at a time, the underlying library that implements that
format's I/O does something dumb like read the whole image in at the beginning.
If the format is not frequently used with very large files by OIIO users, that
could have gone unnoticed.
For textures in particular, we've been extra careful with TIFF and OpenEXR,
less so with other formats. But there may be something really simple we can
fix if we know which format you're using.
-- lg
On Oct 9, 2012, at 7:49 AM, Michel Lerenard wrote:
> Hi everyone,
>
> i've bumped into a small issue using the texture system: it does not seem to
> be limited the amount of memory to use.
>
> I'm initializing the class this way:
>
> float m_cache_size = 500;
> m_oiio_texture_system = TextureSystem::create();
> m_oiio_texture_system->attribute("max_memory_MB", m_cache_size);
> m_oiio_texture_system->attribute("gray_to_rgb", 1);
>
>
> and using it with a simple call to "texture" in an evaluation function.
> I've downloaded a huge map of the earth ( 22k*11k), and the memory raises up
> to 1.6GB, despite the default limit of 256MB.
> I've tried settings higher and lower values, without any difference.
>
> I had a look in the source, but i haven't much: I don't know what i'm doing
> wrong.
>
> I'll take any hint anyone can give me.
>
> Thanks
>
> --------------
> Michel
> [email protected]
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
--
Larry Gritz
[email protected]
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org