Edwin Fine wrote:
> As you probably know, most 64-bit processors use the LP64 model (i.e. 
> ints are 32 bits, longs and pointers 64 bits). 

Until now, not really :-)

> Judicious changes of int to a suitable portable data type would most 
> likely solve these issues.

Woo-hoo! Yes it does, almost immediately. Thank you so much Edwin, 
you've been a big help. Oh, look at those pretty call graphs!

For future googlers, here is the diff from changes I made to get 
ruby-prof working on amd64, 64bit, after receiving an error like this:
integer 23456248293320 too big to convert to `int' (RangeError)

This is in ruby-prof-0.4.1/ext/ruby_prof.c

64c64
<     int thread_id;
---
>     pthread_t thread_id;
97c97
<     int thread_id;
---
>     pthread_t thread_id;
258c258
< static inline int
---
> static inline pthread_t
261c261
<     return NUM2INT(rb_obj_id(thread));
---
>     return NUM2LONG(rb_obj_id(thread));
387c387
<       int len, new_capa;
---
>       ptrdiff_t len, new_capa;
921c921
< static inline int
---
> static inline pthread_t

-- 
Posted via http://www.ruby-forum.com/.