Salikh Zakirov wrote: > Ivan Volosyuk wrote: >> My idea here, is if the function is required by VM, it can be emulated >> on VM side via "alloc + pin". Of cause, it is not the same as >> gc_pinned_alloc. The behaviour of GC will be suboptimal in that case. > > In fact, gc_alloc_pinned() is not intended to be equivalent to gc_alloc() > followed by gc_pin() for the following reasons > > 1) gc_pin() is optional operation, and may be absent in simplest collectors > 2) gc_pin() is not required to succeed, and the GC may decide to reject > object pinning (e.g. based on some memory footprint/performance > compromise). > The success of operation must be checked by using gc_is_object_pinned()
Do you mean gc_pin_object()? It returns void. Why not have it return an indication of success? I mean, it knows, right? geir --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]