Summary: | Fontconfig | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Nick Torys <ntorys> |
Component: | fc-cache | Assignee: | Keith Packard <keithp> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | high | CC: | ntorys |
Version: | 2.1 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Nick Torys
2003-01-28 08:53:14 UTC
I've had several reports of large memory usage when launching fontconfig based apps when fc-cache hasn't been run. Can you try (as root) 'fc-cache -f' and then attempt to run an app and see if this is the same problem? As Keith mentioned in private mail it is the problem with some versions of FreeType, so I provide the version I use: 2.1.3. I debugged the stuff and figured out that FT_New_Face() function in FreeType library (really it's the problem with open_face() function there) sometimes allocates about 40k RAM even if it didn't find the font needed. It contains the ugly gotos ( as fontconfig does also ;) ) for error handling. Something like if( FT_ALLOC( face, ... ) ) goto Fail; if( FT_New( internal ) ) goto Fail; ... face->internal = internal; ... if( error ) goto Fail; ... Fail: if( error ) { clazz->done_face( face ); FT_FREE( face->internal ); FT_FREE( face ); } return error; Bruteforce hacking ( like if( internal ) FT_FREE( internal ); etc ) headed me to segmentation fault. So I should hack it a little bit more. Anyway it's not fontconfig problem & it can't be fixed from inside the library (I tried to enforce FT_Done_Face() call from the fontconfig library but it didn't free the memory). Regards, Dima |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.