Subject:
Re: [ruby-ffi] Re: Pointer Freeing Bug
From:
Shawn Anderson
Date:
1/6/10 7:48 PM
To:
ruby-ffi@googlegroups.com

Also,
To help verify if it is indeed a GC problem, I've found that adding GC.disable at the beginning of your code can tell you if the GC is what is causing problems.

/Shawn

On Wed, Jan 6, 2010 at 5:28 PM, Jon <jon.forums@gmail.com> wrote:
> On Jan 6, 2:43 pm, JEG2 <ja...@graysoftinc.com> wrote:
> > It seems to work, but I wasn't sure how to define the size_t
> > parameter.  I assumed it's an unsigned long and defined it as such:
> >
> >     func :name    => :malloc,
> >          :args    => :ulong,
> >          :returns => :pointer
> >
> > Can I really count on that though?  Is it portable?
>
> Ah, FFI does support size_t.  It's just not listed here:
>
> http://wiki.github.com/ffi/ffi/types
>
> I've switched to using that.
>
> James Edward Gray II


Is size_t portable across FFI impls?

Jon