Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Memory management in shedskin
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gearoid Murphy  
View profile   Translate to Translated (View Original)
 More options Aug 24 2012, 3:28 am
From: Gearoid Murphy <gearoid.p.mur...@gmail.com>
Date: Fri, 24 Aug 2012 00:28:49 -0700 (PDT)
Local: Fri, Aug 24 2012 3:28 am
Subject: Memory management in shedskin

I'm sure this has probably been vigorously debated already but has any
thought been given to using reference counting instead of the garbage
collection in shedskin?
If so, what was the rational?
Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jérémie Roquet  
View profile   Translate to Translated (View Original)
 More options Aug 24 2012, 5:31 am
From: Jérémie Roquet <arkano...@gmail.com>
Date: Fri, 24 Aug 2012 11:31:13 +0200
Local: Fri, Aug 24 2012 5:31 am
Subject: Re: Memory management in shedskin
Hi Gearoid,

2012/8/24 Gearoid Murphy <gearoid.p.mur...@gmail.com>:

> I'm sure this has probably been vigorously debated already but has any
> thought been given to using reference counting instead of the garbage
> collection in shedskin?
> If so, what was the rational?

Issues with garbage collection have been raised several times indeed,
and more or less addressed, but I don't remember reference counting
having been considered as a serious alternative to it.
Implementing an efficient memory management system based on reference
counting like in CPython¹ is not a trivial task, as you have to handle
corner cases such as cyclic references for example. Mark and Sweep
does not have such issue.

But I guess the main reason for using BoehmGC is that it's ready to work :-)

Best regards,

¹ http://docs.python.org/extending/extending.html#reference-counts

--
Jérémie


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gearoid Murphy  
View profile  
 More options Aug 27 2012, 1:13 pm
From: Gearoid Murphy <gearoid.p.mur...@gmail.com>
Date: Mon, 27 Aug 2012 10:13:37 -0700 (PDT)
Local: Mon, Aug 27 2012 1:13 pm
Subject: Re: Memory management in shedskin

Thanks for the info Jérémie. Are you familiar with the automated reference
counting capability of Objective-C:
http://clang.llvm.org/docs/AutomaticReferenceCounting.html

It's not perfect, in that reference loops are still possible if the user
does not take care but it bypasses the terrible performance of GC when
using lots of objects.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jérémie Roquet  
View profile  
 More options Sep 2 2012, 5:56 pm
From: Jérémie Roquet <arkano...@gmail.com>
Date: Sun, 2 Sep 2012 23:56:16 +0200
Local: Sun, Sep 2 2012 5:56 pm
Subject: Re: Memory management in shedskin
Hi again and sorry for the late reply.

2012/8/27 Gearoid Murphy <gearoid.p.mur...@gmail.com>:

> Thanks for the info Jérémie. Are you familiar with the automated reference
> counting capability of Objective-C:
> http://clang.llvm.org/docs/AutomaticReferenceCounting.html

> It's not perfect, in that reference loops are still possible if the user
> does not take care but it bypasses the terrible performance of GC when using
> lots of objects.

No, I'm not familiar with it (I don't own any Apple device, actually).
This may be worth a look. In particular, it would be interesting to
know if this has been chosen for global performance reasons, or maybe
because working on mobile devices matters.

Best regards,

--
Jérémie


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Dufour  
View profile  
 More options Sep 17 2012, 11:29 pm
From: Mark Dufour <mark.duf...@gmail.com>
Date: Tue, 18 Sep 2012 11:29:24 +0800
Local: Mon, Sep 17 2012 11:29 pm
Subject: Re: Memory management in shedskin

> But I guess the main reason for using BoehmGC is that it's ready to work
> :-)

yeah, iirc, it took about an hour to get the boehm gc to "work". I've never
really thought about refcounting after that, other than to note that it
seems messy business.

I quote "work" above because I've encountered/received several python
programs by now that trip up the GC after compilation (memory allocation
goes through the roof because it is unable to deallocate anything). it
would be great if anyone could look into this problem with some depth.. see
for example one of the currently open issues.

thanks,
mark.
--
http://www.youtube.com/watch?v=E6LsfnBmdnk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Dufour  
View profile  
 More options Sep 17 2012, 11:54 pm
From: Mark Dufour <mark.duf...@gmail.com>
Date: Tue, 18 Sep 2012 11:54:54 +0800
Local: Mon, Sep 17 2012 11:54 pm
Subject: Re: Memory management in shedskin

On Tue, Aug 28, 2012 at 1:13 AM, Gearoid Murphy
<gearoid.p.mur...@gmail.com>wrote:

> Thanks for the info Jérémie. Are you familiar with the automated reference
> counting capability of Objective-C:
> http://clang.llvm.org/docs/AutomaticReferenceCounting.html

> It's not perfect, in that reference loops are still possible if the user
> does not take care but it bypasses the terrible performance of GC when
> using lots of objects.

not sure but I seem to remember C++ also has this capability (read: can be
extended to have it), in the form of "smart" or "shared pointers". but
again I've never really looked into this stuff . (note these may not be
compatible with the boehm gc.. :S)

thanks,
mark.
--
http://www.youtube.com/watch?v=E6LsfnBmdnk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Farz Hemmati  
View profile  
 More options Sep 18 2012, 12:29 am
From: Farz Hemmati <fahh...@gmail.com>
Date: Mon, 17 Sep 2012 21:29:26 -0700
Local: Tues, Sep 18 2012 12:29 am
Subject: Re: Memory management in shedskin

Yes, there are scoped pointers, shared pointers, reference-counting
pointers, etc. Currently, all allocators are from the boehm gc, but if
shedskin allowed different allocators or at least allocation syntax, then
you could swap in reference-counting pointers that take care of the
reference counting internally to the pointer object (each
construction/destruction for the same pointer value is a
reference/dereference). With some more work, and likely escape-analysis,
scoped pointers/stack allocation could be used (scoped pointers are usually
used when creation of an object is conditional and there are multiple
return points from the function, or as a instance variable that may come in
as NULL but ownership is taken).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »