I think you are misunderstood. The cache subsystem memory bounding only accounts for the objects stored in the cache itself (i.e. glyph outlines, bitmaps, charmaps), but not the FT_Face and FT_Size objects themselves. Iirc, you can purge the latter if you want without purging the cache objects themselves.
Trying to memory-bound the FT_Face and FT_Size objects themselves is pretty impossible due to the nature of the font format we're trying to support. Also, the memory bounding does not account for malloc-specific memory block padding and other stuff like that, so even getting an absolutely correct estimates of all the bytes consumed is impossible. Hope this helps. - David Turner 2010/3/10 Maggy Anastasia <maggymaggyma...@gmail.com> > Dear FreeType Developers, > > I have a few questions regarding freetype memory consumption upper bound; I > am using Freetyper version 2.3.7 > > (1) static array: currently we know that all memory consumption by freetype > is done through malloc calls and its variants. However, is there any other > memory used in freetype, such as global arrays, which are used for memory > allocation? If so, do they need any kind of configuration? > > (2) Is there a way for determining the upper bound of memory usage for > freetype when cache is being used. I know that we can set the upper bound > for cache nodes (glyph image, cmap, sbitchace, etc.), but is there a way to > determine the memory consumption for FT_FACE and FT_SIZE? From what I have > seen regarding this, we can only limit the number of FT_FACE and FT_SIZE; > however, how to determine the memory requirements for a given number of > allowable FT_FACE and FT_SIZE. I am using freetype for an embedded system at > the moment, thus, memory is really a constraint, and it's very important for > me to be able to determine the size of the heap. > > > best regards > > Maggy Anastasia Suryanto > > _______________________________________________ > Freetype-devel mailing list > Freetype-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/freetype-devel > >
_______________________________________________ Freetype-devel mailing list Freetype-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-devel