User: Password:
|
|
Subscribe / Log in / New account

Pauses

Pauses

Posted Jun 17, 2010 17:47 UTC (Thu) by jordanb (guest, #45668)
In reply to: Pauses by nix
Parent article: The Managed Runtime Initiative

> (The Boehm GC, via a triumph of inspired hackery, manages to do the first
> without source code changes: but it's computationally expensive as GCs go,
> not type-accurate, and can sometimes leave extra garbage lying around. I
> don't really understand why more C programs don't use the Boehm GC, though

Seriously?

With a sales pitch like that, who wouldn't use it? :P

Anyway, I think RAII is a better approach to memory management than GC for high-performance applications. It's deterministic and has very little run-time cost. The only disadvantage is that it doesn't exist in C, but it's supported by all modern languages except the ones that have gone the builtin-GC route.


(Log in to post comments)

RAII, but no GC?

Posted Jun 17, 2010 19:05 UTC (Thu) by sbishop (guest, #33061) [Link]

I am not aware of a modern language which does not have built-in GC. (Though "built-in GC" is a requirement under most people's definition of "modern language".) Which languages are you thinking of? I don't mean to argue with you; I'm just curious.

I'm also curious to know where RAII is used outside of C++.

RAII, but no GC?

Posted Jun 17, 2010 19:29 UTC (Thu) by alextingle (guest, #20593) [Link]

Python uses RAII, I believe.

RAII, but no GC?

Posted Jun 17, 2010 21:18 UTC (Thu) by tack (guest, #12542) [Link]

Not exactly. It's a peculiarity of (current versions of) CPython that RAII patterns can work, however there's nothing in the language that specifies that behavior, and you can't expect it from other implementations like Jython, or perhaps not even from future versions of CPython.

RAII, but no GC?

Posted Jun 19, 2010 13:39 UTC (Sat) by cortana (subscriber, #24596) [Link]

Perhaps Alex was referring to to the 'with' statement: http://docs.python.org/reference/compound_stmts.html#with

Pauses

Posted Jun 20, 2010 20:18 UTC (Sun) by nix (subscriber, #2304) [Link]

With a sales pitch like that, who wouldn't use it? :P
Heh. Well, it does about as well as it's possible to do in C without massive assistance from the application. But that takes tradeoffs...


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds