ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Yue Wang <yuleopen@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Possible memory leak?
Date: Mon, 2 Feb 2009 17:13:20 +0800	[thread overview]
Message-ID: <68bfdc900902020113n13def902j4887b47c2f07a7c2@mail.gmail.com> (raw)
In-Reply-To: <4986B338.6080903@wxs.nl>

> on my machine running mk with a fresh cache gives the same lua mem usage as
> with filled cache, however a fresh run tops at 1 meg while a filled run tops
> ar 500 (windows vista); that document uses several cjk fonts (relatively
> large due to many glyphs) and script fonts (some arabic and zapfino as well
> as cambria math which are much larger fonts due to many features
>
> mkiv lua stats : loaded fonts              - adobesongstd-light:otf
> arabtype:ttf c:/windows/fonts/cambria:ttc htfs:ttf htsong:ttf ko
> eieletters:afm lmex10:tfm lmmi10:tfm lmmib10:tfm lmmono10-regular:otf
> lmmonoltcond10-regular:otf lmroman10-italic:otf lmroman10-regu
> lar:otf lmroman12-regular:otf lmsans10-regular:otf lmsy10:tfm
> lmtypewriter10-regular:otf msam10:tfm msbm10:tfm palatinoltarabic-regu
> lar:ttf rm-lmbx10:tfm rm-lmr10:tfm rm-lmr12:tfm rm-lmr8:tfm rm-lmtt10:tfm
> scheherazaderegot:ttf texnansi-lt55484:afm texnansi-lt5548
> 5:afm texnansi-lt55488:afm texnansi-lt55507:afm zapfinoextraltpro:otf
>

depends on how you use them.
\font\a=simsun at 10pt and \definetypeface blablabla [simsun] are different.

> mkiv lua stats : current memory usage      - 361 MB (ctx: 370 MB)

You cannot depend on the memory report by mtxrun.
The actual memory usage is *much* larger than the reported value.
Only the one reported by the system is believable.

>
> (keep in mind that at some point luatex has to load the glyph shapes and
> pass them to the pdf file so there will always be otf/pfb loading at the end
> of a run)
>
> as taco mentioned, real memory usage for a fresh run is probably somewhat
> lower due to fragmentation

The memory usage without taking fragmentation into account has nothing
to do with the user's experience.

With 1G memory on my machine, and the best memory allocation
implementation I can find (The FreeBSD operating system's memory
allocation algorithm is very efficient. Firefox 3 also uses its
implementation). In order to use ConTeXt with 4 chinese fonts, I
should
- First, quit Firefox, Gnome and X Window
- Run sudo shutdown now and log into the single user mode
- Run context foobar.tex, when finishing dumping the first Chinese
font's font cache, press control + C, and run that again for the
second font.

And that's my experience. If I don't do that, the swap will be caching
for several minutes, and finally the kernel stopped the luatex program
since it uses too much memory.


>
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                             | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2009-02-02  9:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-01 14:44 Yue Wang
2009-02-01 15:03 ` Hans Hagen
2009-02-02  4:35   ` Yue Wang
2009-02-02  8:47     ` Hans Hagen
2009-02-02  9:13       ` Yue Wang [this message]
2009-02-02 22:14         ` Taco Hoekwater
2009-02-01 15:47 ` Taco Hoekwater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68bfdc900902020113n13def902j4887b47c2f07a7c2@mail.gmail.com \
    --to=yuleopen@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).