texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] memory leak


From: Gubinelli Massimiliano
Subject: Re: [Texmacs-dev] memory leak
Date: Fri, 19 Dec 2008 12:07:18 +0100


On 19 déc. 08, at 11:59, Joris van der Hoeven wrote:

On Fri, Dec 19, 2008 at 11:18:40AM +0100, Gubinelli Massimiliano wrote:
and the other half is due to  (without showing the uppert part of the
stack which is the same as before)

  5 libguile.17.dylib   66.00 Kb     deval
  4 libguile.17.dylib   33.00 Kb     scm_difference
  3 libguile.17.dylib   33.00 Kb     scm_i_mkbig
  2 libgmp.3.dylib   33.00 Kb     __gmpz_init
  1 libgmp.3.dylib   33.00 Kb     __gmp_default_allocate
  0 libSystem.B.dylib   33.00 Kb     malloc

this does not happen with X11.

Argh!!!

It seems that the dependency on GMP is responsable for the mess.
These recent versions of Guile are really fucked up!

I will try to install an older version of Guile and see what happens.
Now several mysterious issues remain:
 * Why does this only happen in combination with Qt?
 * How does GMP memory allocation interact with Qt memory allocation?


The same happens (at a lower rate) with Cocoa. After a minute of idle texmacs I get the following (4kb of 16 byte blocks allocated in the meanwhile):


  40 texmacs.bin    4.52 Kb     start
39 texmacs.bin 4.52 Kb main ../../src/src/Texmacs/Texmacs/ texmacs.cpp:301 38 texmacs.bin 4.52 Kb start_guile(int, char**, void (*) (int, char**))
  37 libguile.17.dylib    4.52 Kb     scm_boot_guile
  36 libguile.17.dylib    4.52 Kb     scm_with_guile
  35 libguile.17.dylib    4.52 Kb     scm_i_with_guile_and_parent
  34 libguile.17.dylib    4.52 Kb     scm_c_with_continuation_barrier
  33 libguile.17.dylib    4.52 Kb     scm_i_with_continuation_barrier
  32 libguile.17.dylib    4.52 Kb     scm_c_catch
  31 libguile.17.dylib    4.52 Kb     c_body
  30 libguile.17.dylib    4.52 Kb     invoke_main_func
  29 texmacs.bin    4.52 Kb     new_call_back(void*, int, char**)
  28 texmacs.bin    4.52 Kb     TeXmacs_main(int, char**)
  27 texmacs.bin    4.52 Kb     gui_start_loop()
26 texmacs.bin 4.52 Kb aqua_gui_rep::event_loop() ../../src/ src/Plugins/Cocoa/aqua_gui.mm:338 25 texmacs.bin 4.50 Kb aqua_gui_rep::update() ../../src/src/ Plugins/Cocoa/aqua_gui.mm:223
  24 texmacs.bin    4.50 Kb     update()
  23 texmacs.bin    4.50 Kb     texmacs_interpose_handler()
22 texmacs.bin 4.50 Kb tm_server_rep::interpose_handler() ../../src/src/Texmacs/Server/ tm_server.cpp:304
  21 texmacs.bin    4.50 Kb     exec_pending_commands()
  20 texmacs.bin    4.44 Kb     call(object)
  19 texmacs.bin    4.44 Kb     call_scheme(scm_unused_struct*)
  18 texmacs.bin    4.44 Kb     TeXmacs_call_scm(arg_list*)
  17 libguile.17.dylib    4.44 Kb     scm_internal_catch
  16 libguile.17.dylib    4.44 Kb     scm_c_catch
  15 texmacs.bin    4.44 Kb     TeXmacs_lazy_call_scm(arg_list*)
  14 libguile.17.dylib    4.44 Kb     scm_internal_lazy_catch
  13 libguile.17.dylib    4.44 Kb     scm_c_with_throw_handler
  12 texmacs.bin    4.44 Kb     TeXmacs_call(arg_list*)
  11 libguile.17.dylib    4.44 Kb     scm_call_0
  10 libguile.17.dylib    4.44 Kb     scm_dapply
   9 libguile.17.dylib    4.44 Kb     deval
   8 libguile.17.dylib    4.44 Kb     deval
   7 libguile.17.dylib    4.44 Kb     deval
   6 libguile.17.dylib    2.22 Kb     deval
   5 texmacs.bin    2.22 Kb     tmg_texmacs_time()
   4 texmacs.bin    2.22 Kb     int_to_scm(int)
   3 libguile.17.dylib    2.22 Kb     scm_i_long2big
   2 libgmp.3.dylib    2.22 Kb     __gmpz_init_set_si
   1 libgmp.3.dylib    2.22 Kb     __gmp_default_allocate
   0 libSystem.B.dylib    2.22 Kb     malloc


I do not understand why this does not happen in X11. Maybe the way we call the interpose_handler? Can you explain me which part of the guile code is calling tmg_texmacs_time ?

max



Thanks for your investigations, Joris


_______________________________________________
Texmacs-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/texmacs-dev





reply via email to

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