[M3devel] explanation of CheckLoadTracedRef?

Jay jay.krell at cornell.edu
Tue Apr 21 11:37:21 CEST 2009


> > How bad/unportable was it the previous way, the VM-synchronized way?
> 
> Not compatible with system threading.


 

Really? NT386 wasn't VM-synchronized back in 3.6, 4.1, etc.?

Or only with great cost?

I have to admit, those old import .libs, kernel32.lib, etc. I didn't realize what was in them when I deleted them. I thought they were just regular import .libs.

I think I got luckly in that the overlap between me deleting them and you removing VM-synchronized GC was small or zero.

 

 

> You should *never* access a field in the heap in C code! All 
> accesses to traced fields in the heap must take place in Modula-3. 
> Otherwise things will break! C wrappers should not do anything other 
> than forward calls to C library calls. They should not perform heap 
> accesses.


 

Ok, that makes sense.

Important "out" is the accessing stack is always ok.

But this is a requirement I didn't keep in mind.

Now, luckily, the C wrappers are all relatively thin and not difficult

to re-review in their entirety.

 

 

But, take for example "open".

The first parameter to it is bound to be in the heap.

 

 

But probably it is untraced or somehow ok, since it does

come from a module used primarily for C interop.

 

 

And, the line between C wrappers and the "C library" that they forward to

does not exist.

If I, say, pass a VAR to a VAR..no check is made?

Important to declare extern/C functions as taking UNTRACED REF and not VAR?


 

> I think you are confusing incremental and incremental GC.
You assume I understand more than I do (I assume you have a typo. :))

 

 

"generational" -- the concept that most objects die young.

  (aka most objects could have been allocated on the stack...)

 

 

But does that imply detailed implementation choices, or is just like a "guiding principle"?

I guess it implies the heap is split into at least two generations, old and young.

Though I guess in reality there is a range of young, less young, lesser young, least young, etc.

 

 

And that has objects age, they should be moved from young to old heaps, and references to them either updated right away, or "caught" upon use and updated then...something like that.

 

 

"incremental" -- don't pause the world..

 

 

 - Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20090421/24171854/attachment-0002.html>


More information about the M3devel mailing list