There are rare occasions on which fully conservative collectors, i.e. collectors that conservatively scan the heap, retain too much memory. These can be addressed by providing limited type information. The Costs of Precise Pointer Identification Precise collectors also have a number of performance costs, which often outweigh those of conservative pointer identification. A conservative collector can support such inter-language calls very conveniently. Pointers elsewhere can be trivially added to the garbage collector's root set, possibly even by default without programmer intervention.
Native code can allocate memory in a section of the heap traced by the garbage collector.
Failure to follow the protocol, such as failure to register a cached object reference, leads to intermittent heap corruption. Such a restriction would, for example, disallow most standard induction variable optimizations, as well as preventing motion of some loop invariant array access code out of loops. This is much less of a problem if derived pointers are allowed at safe points, though some more esoteric optimizations may still become impossible, and manual optimization for critical code becomes risky. Precise garbage collectors generally do require safe points in all loops to ensure that any thread can be advanced to a safe point in bounded time. The protocol required for inter-language calls with a precise collector can incur significant overhead.