As the title says, is there a way to convert a number (say a float or interger) that stores an address into a pointer?
For example, in Julia one can convert a pointer into a integer by doing:
data = [1, 2]
ptr = pointer( data ) # Has type "Ptr{Int64}"
address = UInt64( ptr ) # Has type "UInt64"
How can one reverse these steps to get back the pointer? Say:
ptr = unknownFunction(address) # Has type "Ptr{Int64}"
Alternatively, is there a way to directly change the address held by a pointer? Say one has a pointer with:
Ptr{Int64} @0x0000000036f94110
How can you modify the address it hold to another number, for example 0x000000003ffffff0.