From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47147 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Possible memory leak? Date: Sun, 01 Feb 2009 16:47:38 +0100 Message-ID: <4985C41A.5050303@elvenkind.com> References: <68bfdc900902010644t71ec3644ue02d9fd29ef73282@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233503331 26334 80.91.229.12 (1 Feb 2009 15:48:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2009 15:48:51 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 01 16:50:05 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LTeaB-0005pZ-2C for gctc-ntg-context-518@m.gmane.org; Sun, 01 Feb 2009 16:50:03 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B4DF11FD9B; Sun, 1 Feb 2009 16:48:40 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21955-06; Sun, 1 Feb 2009 16:47:40 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 06B251FB71; Sun, 1 Feb 2009 16:47:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B23A21FB64 for ; Sun, 1 Feb 2009 16:47:37 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24345-03 for ; Sun, 1 Feb 2009 16:46:59 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by ronja.ntg.nl (Postfix) with ESMTP id 200881FB71 for ; Sun, 1 Feb 2009 16:46:59 +0100 (CET) Original-Received: from smtp-vbr6.xs4all.nl (smtp-vbr6.xs4all.nl [194.109.24.26]) by filter4-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n11Fkwjm005094 for ; Sun, 1 Feb 2009 16:46:58 +0100 Original-Received: from [192.168.178.26] (boo.demon.nl [82.161.175.147]) (authenticated bits=0) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id n11Fkrtl049926 for ; Sun, 1 Feb 2009 16:46:58 +0100 (CET) (envelope-from taco@elvenkind.com) User-Agent: Thunderbird 2.0.0.18 (X11/20081120) In-Reply-To: <68bfdc900902010644t71ec3644ue02d9fd29ef73282@mail.gmail.com> X-Virus-Scanned: by XS4ALL Virus Scanner X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=194.109.24.26; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 173357936 - 6dd4fe8e4b9d X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:47147 Archived-At: Hi Yue Wang, Yue Wang wrote: > myfont = load_font('arial.ttf') > myfont = load_font('arial.ttf') > } > and I can see the memory usage may ebb and flow, but actually it is > leaking memory. I also see a non-trivila leak (somewhere inside the fontforge library). I will investigate further next week, it is not that massive. I get this result for your input file, with 500 arial.ttfs (ArialMT version 3.0, 367112 bytes): ==8819== LEAK SUMMARY: ==8819== definitely lost: 16,965,191 bytes in 707,541 blocks. ==8819== possibly lost: 1,128 bytes in 22 blocks. ==8819== still reachable: 202,135,427 bytes in 81,127 blocks. ==8819== suppressed: 0 bytes in 0 blocks. ==8819== Rerun with --leak-check=full to see details of leaked memory. So some 32kb per font. Noticeable, but not enormous. The growth in 'top' is probably caused more by memory fragmentation than by this leak. Best wishes, Taco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________