[erlang-questions] REF: native pointer size query (URGENT)

David KOCH <>
Sun Dec 14 20:29:47 CET 2008


I'm looking forward a way to know, erlang side,
the size and type of a pointer. Understand if
running on a 32 bits big endian machine, have
a macro that gives me the correct size of the
pointer :

-ifdef(32BITS).
    -define(_PTR, 32/unsigned-native).
-else.
    -define(_PTR, 64/unsigned-native).
-endif.

http://www.erlang.org/documentation/doc-5.6/doc/programming_examples/bit_syntax.html

The endianness can be set to 'native', resolved
at load time, but I also need to know the size
of the data.

Thanks...

-- 
KOCH David - http://www.kochise.com/



More information about the erlang-questions mailing list