FFI :buffer_out params incorrectly handled as pinned arrays by jffi
-------------------------------------------------------------------
Key: JRUBY-3719
URL: http://jira.codehaus.org/browse/JRUBY-3719
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.3RC2
Reporter: Wayne Meissner
Assignee: Thomas E Enebo
Priority: Blocker
Fix For: JRuby 1.3
When a buffer is passed to a function either as a :buffer_out parameter, or
the buffer was allocated via Buffer.new_out or Struct.new_out, then the backing
array will be pinned by the JVM, instead of allocating temporary native memory.
Pinning arrays turns off garbage collection until all arrays are unpinned, so a
:buffer_out param on a blocking function (e.g. read()) could block GC across
all threads.
A patch to work around the problem in jruby will be forthcoming.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email