From: Thomas Chust Date: 2009-08-07T19:48:01+09:00 Subject: Re: FFI, sysctl, pointer question 2009/8/7 Andrea Fazzi : >  [...] >  tv_size_ptr = FFI::MemoryPointer.new(:int).write_int(tv.size) > [...] Hello, size_t in ANSI C is required to be unsigned and is usually defined as unsigned long. Therefore the above code is always wrong in that it stores a signed integer, and it is likely wrong on some 64 bit systems where an int is 32 bits wide but a long is 64 bits wide. cu, Thomas -- When C++ is your hammer, every problem looks like your thumb.