Re: [Vala] Vala in Python - More progress and a question

2013-04-21 Thread Donn

On 21/04/2013 09:53, Evan Nemerson wrote:

When you load a shared library the memory actually used is shared not
just within the same process, but across all processes using that
library.  In all likelihood, some other process (like gnome-shell) is
already using Clutter and your program using Clutter doesn't require any
additional resources.


I'm glad to hear it!

Thanks for the links and your help.


\d
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala in Python - More progress and a question

2013-04-21 Thread Evan Nemerson
On Sun, 2013-04-21 at 09:21 +0200, Donn wrote:
> On 20/04/2013 21:14, Evan Nemerson wrote:
> > ..  it's generally a good idea to use
> > GObject-style construction [1].  In your original example, simply
> > replace "public RedSquare()" with "construct" and it should work as
> > expected.
> 
> Appreciate that, thanks. I shall read up and hack it thus.
> 
> 
> A question?
> In this thread I have "loaded" Clutter (library and whatever else it 
> loads) in Python.
>   I have also included (I am not sure of the wording) Clutter into Vala 
> (by way of the --pkg in valac) to some extent - where I made a 
> Clutter.Actor object.
> 
> I run Python which loads my library: How many times has Clutter now 
> loaded into memory? Once or twice?

It depends a bit on how you define things, but the answer you're
probably looking for is "either zero or one times".

When you load a shared library the memory actually used is shared not
just within the same process, but across all processes using that
library.  In all likelihood, some other process (like gnome-shell) is
already using Clutter and your program using Clutter doesn't require any
additional resources.


-Evan

[1]
http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-linux.html

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala in Python - More progress and a question

2013-04-21 Thread Donn

On 20/04/2013 21:14, Evan Nemerson wrote:

..  it's generally a good idea to use
GObject-style construction [1].  In your original example, simply
replace "public RedSquare()" with "construct" and it should work as
expected.


Appreciate that, thanks. I shall read up and hack it thus.


A question?
In this thread I have "loaded" Clutter (library and whatever else it 
loads) in Python.
 I have also included (I am not sure of the wording) Clutter into Vala 
(by way of the --pkg in valac) to some extent - where I made a 
Clutter.Actor object.


I run Python which loads my library: How many times has Clutter now 
loaded into memory? Once or twice?



Is there some general rule I can learn to understand (or test) this 
process? (Under Linux)


Thanks again,
\d
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list