This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: Document and prototype JvAllocBytes() for CNI


Tom Tromey wrote:

"Bryce" == Bryce McKinlay <mckinlay@redhat.com> writes:



Bryce> +This function can be useful if you need to associate some native data with a
Bryce> +Java object (perhaps stored in a RawData field - @pxref{Mixing with C++,,The
Bryce> +RawData Type}),


Actually you don't want to store _Jv_AllocBytes results in a RawData
field. It will just be collected instantly as these fields are not
scanned.



Hmm, good point. I keep forgetting about that.


I wonder whether we should support _Jv_AllocBytes as a user API at
all. I suppose it is useful for local allocations. But do we really
want to support storing the result of _Jv_AllocBytes in a field with
type Object? I'm concerned that we may want, at some future date, to
be able to assume that field types are actually meaningful.



I think we need a varient of the RawData type that is scanned. There are places in libgcj where we use "Object" to store native data.


Regards

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]