On Wednesday, October 31, 2012 3:25:40 AM UTC+1, Cédric Beust ♔ wrote:
>
> This declares a union type that is made of either an array of 65k pointers 
> to integers or a single integer. Then you initialize this record in its "x" 
> side with the memory address you want to peek and you access it by using 
> the "x" side of the record.
>
> It took me months to understand what this code did, but what a revelation 
> it was when it finally clicked...
>
 
I don't get it... :) While I can see a trick in declaring a virtual 
memory-map overlaying the entire memory space, addressable by integer 
offset; how does y (and the remaining memory) become useful at all, if it 
consumes 64K integers? Is the trick that while you can initialize with y, x 
doesn't actually reserve any memory, yet remaining able to address by x?

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/javaposse/-/BmE2k6FkW-AJ.
To post to this group, send email to javaposse@googlegroups.com.
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to