Linked by kragil on Wed 23rd Jan 2013 20:26 UTC
Google "Native Client enables Chrome to run high-performance apps compiled from your C and C++ code. One of the main goals of Native Client is to be architecture-independent, so that all machines can run NaCl content. Today we're taking another step toward that goal: our Native Client SDK now supports ARM devices, from version 25 and onwards."
Thread beginning with comment 550290
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[9]: Comment by Laurence
by moondevil on Thu 24th Jan 2013 08:18 UTC in reply to "RE[8]: Comment by Laurence"
moondevil
Member since:
2005-07-08

Is it kind of like acquiring a mutex that forbids the GC from running and thus forces it to behave exactly as you want it to ?


Well, first of all this type of code is relegated to such blocks, because manual memory management is usually used together with other tricks, so in safer languages you want to minimize its use unless it is really required.

Usually this is memory that is outside GC knowledge so it should be handled with care and not escape unsafe code.

In most languages with such features you can use compiler switches to prevent compilation of unsafe code.

Here are some links about how to do this

Modula-3
http://modula3.elegosoft.com/cm3/doc/reference/complete/html/2_7Uns...

C#
http://msdn.microsoft.com/en-us/library/system.intptr.topointer.asp...

D
http://dlang.org/memory.html

Go

A bit cumbersome, but you can do it via cgo
http://golang.org/cmd/cgo/

Oberon
Oberon's case is special, since the GC is implemented at the kernel level. So only a small piece of code, written in Assembly does manual memory management.

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.14.1857

But for the cases where the language is implemented on top of other operating systems, there are language extensions to mark pointers as not being tracked by GC.

Reply Parent Score: 2