From: Eric Wong Date: 2020-07-15T23:35:40+00:00 Subject: [ruby-core:99185] Re: [Ruby master Bug#17023] How to prevent String memory to be relocated in ruby-ffi tenderlove@ruby-lang.org wrote: > Right, that makes sense. I really need to document this (and > I apologize for not doing so already), but > `rb_gc_register_address` will pin your objects. When you know > you're done with the reference, you can release it with > `rb_gc_unregister_address`. Of course if you don't call the > unregister function, the reference will stay alive forever. Btw, does rb_gc_register_mark_object pin? A quick glance at gc.c tells me it doesn't, and I'll need to revert commit 2a6cb76d5010cb763ef5a2c305728465d15eb7c9 in unicorn: https://yhbt.net/unicorn-public/20181226050857.6413-1-e@80x24.org/ Anyways, it takes me too long to compile Ruby so I'm back to running whatever my distro ships. I haven't been able to test GC.compact at all. > https://bugs.ruby-lang.org/issues/17023#change-86563 Unsubscribe: