freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Determining Upper Bound of memory consumption for a syste


From: Werner LEMBERG
Subject: Re: [ft-devel] Determining Upper Bound of memory consumption for a system using FT cache subsystem
Date: Sat, 13 Mar 2010 13:06:00 +0100 (CET)

> (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?

Yes, there are static arrays, see for example src/psnames/pstables.h.
However, they can be put into read-only memory since all of them are
tagged with the `const' modifier.

> (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.

I suggest that you use the FreeType memory debugger (see the
FT_DEBUG_MEMORY option in docs/DEBUG).  For debugging, the heap size
can be limited with the FT2_ALLOC_TOTAL_MAX environment variable.  Its
results can be then used for your own memory allocation routines.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]