Re: [Mono-dev] Next Release?

2014-06-11 Thread Hüning , Christian
Sounds great! Another question, 'cause I am curious: would it be too much hassle to release a 64 bit version alongside the 32 bit one as well? I am working on a project using edge.js and Mono on OSX and I need to compile a 64 bit version of Mono on my own on each machine I want to use that combin

Re: [Mono-dev] Next Release?

2014-06-11 Thread Rodrigo Kumpera
We expect it to happen in the next few weeks. On Wed, Jun 11, 2014 at 1:07 PM, Hüning, Christian < christian.huen...@haw-hamburg.de> wrote: > Is there any schedule for when the next version of Mono will officially be > released? > > > > ___ > Mono-deve

[Mono-dev] Next Release?

2014-06-11 Thread Hüning , Christian
Is there any schedule for when the next version of Mono will officially be released? smime.p7s Description: S/MIME cryptographic signature ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread Alex Rønne Petersen
To know if an arbitrary pointer is a GC'd pointer, conceptually you need to ask: 1. sgen_ptr_in_nursery (ptr) ? 2. major_collector.is_valid_object (ptr) ? 3. sgen_ptr_is_in_los (ptr, &base) ? If all of these are false, you know it's just some random pointer you don't care about. On Wed, Jun 11,

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread Andrea Francesco Iuorio
Sgen see the small major heap as a list of object blocks. We create, using the threads stack and other sources, a queue of potential pointer, sort them and then, since it is sorted, we assign to a block the index of the queue where we can find the first pointer in the block area. After that, each b

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread Andrea Francesco Iuorio
It is possible that the stack contains garbage values that aren' t references, but we know all the objects in the major heap. We just don' t know who is alive and who isn' t, and this is why we need to check the stack. 2014-06-11 16:03 GMT+02:00 serus : > I think this is the part that I do not u

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread Alex Rønne Petersen
Amendment: That being said, if you're actually writing new code, prefer to check !sgen_ptr_in_nursery (obj) && sgen_object_safe_get_size (obj) <= SGEN_MAX_SMALL_OBJ_SIZE. That's generally better than sgen_los_is_valid_object () which performs a pass over all LOS objects. On Wed, Jun 11, 2014 at 3:

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread serus
I think this is the part that I do not understand. Can't the value on the stack (assuming the stack is being scanned conventionally and the value is not actually a pointer but a long) point to unallocated memory, or to memory that is allocated but not for objects but some runtime data structure?

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread Alex Rønne Petersen
Well, if you have a non-null object pointer and !sgen_ptr_in_nursery (obj) && !sgen_los_is_valid_object (obj) it must by necessity be in the major heap. On Wed, Jun 11, 2014 at 3:45 PM, serus wrote: > Thanks for the hints. I looked through all three and while 1. and 3. solve > (1), they do not de

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread serus
Thanks for the hints. I looked through all three and while 1. and 3. solve (1), they do not deal with the case I am interested in which is if the object resides in the major heap (assuming a non-fixed major heap). Would you happen to also have pointers for that case? -- View this message in cont

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread Alex Rønne Petersen
There are 3 relevant functions for this: 1. sgen_ptr_in_nursery () 2. sgen_safe_get_object_size () 3. sgen_ptr_is_in_los () grep for those in mono/metadata to see how they work and how they're used. On Wed, Jun 11, 2014 at 2:13 PM, serus wrote: > Thanks for the info. > > From what I understood,

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread serus
Thanks for the info. >From what I understood, a conventional collector would treat all values found on stack / registers as potential pointers. To pin the object, it needs to 1) find out if the pointer is pointing to an actual object or to a random memory address; and 2) find the base address of t

Re: [Mono-dev] field pointer and garbage collection

2014-06-11 Thread Alex Rønne Petersen
As with any pointer updating during GC, this can only be done with precise type and liveness information. If any pointer to an object -- whether base or interior -- exists in CPU registers or on the stack, the object is considered pinned and will not be moved. The exception to this is when you run

[Mono-dev] field pointer and garbage collection

2014-06-11 Thread serus
Dear Devs, I would appreciate if someone could make sense out of the following: When a field of an object is accessed in C#, the IL code is LDFLD. Intuitively, I would assume that the JIT compiler would transform LDFLD into the assembler version of the following C code: int A = *(int*)(ptr + 24)