freetype-devel
[Top][All Lists]
Advanced

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

RE: [ft-devel] Memory problem?


From: Chris Altick
Subject: RE: [ft-devel] Memory problem?
Date: Thu, 21 Jun 2007 11:36:34 -0400

Hi All,

I'm trying to debug what appears to be leaking memory processing.

Here's the output of the debug so far, since I'm using an embedded system without stdio and no place to exit to when ft_mem_debug_panic gets called, so this is as far as my program goes.  I'll mention that normally I'm able to render a lot of glyphs before the sky falls.

FreeType Memory Dump: current=358 max=178814 total=316543 count=2
 block  block    sizes    sizes    sizes   source
 count   high      sum  highsum      max   location
-------------------------------------------------
     0      2        0   120424    60212 ttmtx.c:168
     0      1        0    16384    16384 ftobjs.c:3714
     0      1        0    16215    16215 afglobal.c:163
     0      2        0     4552     2276 ttmtx.c:169
     0      1        0     4480     4480 afhints.c:705
     0      2        0     3232     1616 ftoutln.c:267
     0      2        0     1792      896 ftgloadr.c:221
     0      1        0     1792     1792 ftgloadr.c:227
     0     17        0     1104      204 ftobjs.c:3469
     0      2        0      988      780 afhints.c:52
     0      2        0      912      720 afhints.c:97
     0      1        0      828      828 ftobjs.c:999
     0      1        0      820      820 afglobal.c:243
     0      8        0      768       96 ftgloadr.c:76
     0      4        0      632      304 ftobjs.c:2015
     0      1        0      608      608 ttinterp.c:787
     0      1        0      512      512 ttinterp.c:464
     0      1        0      320      320 ttload.c:719
     1      1      306      306      306 ftbitmap.c:79
     0      1        0      306      306 ftrend1.c:178
     0      1        0      288      288 ttload.c:319
     0      3        0      272      104 ftcmanag.c:587
     0      2        0      224      112 ftgloadr.c:222
     0      5        0      216       56 ftcmru.c:267
     0      2        0      202      101 ftoutln.c:268
     0      1        0      196      196 ftobjs.c:3707
     0      3        0      192       64 ftccache.c:332
     0      1        0      180      180 ftcmanag.c:363
     0      1        0      160      160 ftobjs.c:372
     1      3       52      144       52 ftglyph.c:355
     0      2        0       64       32 ftcimage.c:67
     0      3        0       60       20 ftgrays.c:1901
     0      1        0       56       56 ftobjs.c:1002
     0      1        0       56       56 ftobjs.c:2756
     0      4        0       48       12 ftobjs.c:3154
     0      2        0       46       32 sfobjs.c:265
     0      1        0       40       40 ftobjs.c:228
     0      1        0       40       40 ftobjs.c:140
     0      2        0       25       17 sfobjs.c:60
     0      1        0       24       24 ftraster.c:3233
     0      1        0       16       16 afhints.c:688
     0      2        0       16        8 ftgloadr.c:249
     0      1        0       12       12 ftobjs.c:1791
     0      1        0       10       10 ttpload.c:230
     0      2        0        8        4 ftoutln.c:269
     0      1        0        4        4 ftobjs.c:2769
     0      1        0        4        4 sfobjs.c:404
------------------------------------------------
leaked memory block at address C0F31048, size      306 in (ftbitmap.c:79)
leaked memory block at address C0F30FE8, size       52 in (ftglyph.c:355)
FreeType: total memory allocations = 316543
FreeType: maximum memory footprint = 178814
FreeType.Debug: FreeType: 358 bytes of memory leaked in 2 blocks


-----Original Message-----
From: address@hidden on behalf of Werner LEMBERG
Sent: Wed 6/13/2007 11:54 PM
To: address@hidden
Cc: address@hidden
Subject: Re: [ft-devel] Memory problem?

> When I use FT_New_Memory_Face, the phenomenon is more obvious than
> FT_New_Face.  I have enabled the built-in debugger, and traced those
> message, I don't know how to determine where the leak:

What you've enabled is the normal debugger, not the memory debugger!

You should enable

  #define FT_DEBUG_LEVEL_ERROR
  #define FT_DEBUG_LEVEL_TRACE
  #define FT_DEBUG_MEMORY

in ftoption.h, then running your program with

  FT2_DEBUG_MEMORY=1 <your program>

It might also help running valgrind on your program (provided you are
on a GNU/Linux box); maybe something similar exists for Windows too...


     Werner


_______________________________________________
Freetype-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype-devel

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


reply via email to

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