An important pull request: accessing shared affix for immutable data

tsbockman via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 13 02:36:54 PST 2016


On Saturday, 13 February 2016 at 08:16:04 UTC, Ola Fosheim 
Grøstad wrote:
> On Saturday, 13 February 2016 at 03:03:05 UTC, tsbockman wrote:
>> I was actually suggesting encoding the shared-ness into the 
>> memory address itself. (No tricks - just allocate shared data 
>> in a separate memory range. This may only be feasible on 
>> 64-bit though, with its over-abundance of address space.)
>>
>> This way, you can determine whether the (meta-)data is shared 
>> without accessing it at all, just by asking the allocator 
>> about the address.
>
> Be careful:
>
> https://en.wikipedia.org/wiki/Address_space_layout_randomization

What issue, specifically, are you trying to point out?

Obviously even with ASL the heap has large contiguous chunks of 
address space available to it, otherwise it could not allocate 
large arrays. That is all that is required for my scheme to be 
workable, I think.


More information about the Digitalmars-d mailing list