Won't some functions doing just what addRange() and removeRange() do solve that kind of problem (if necessary)? That means, forbidding the GC to scan some memory area for some time?

Like their C++11 counterparts:

void declare_reachable(void* p); // the region of memory starting at p
                                                // (and allocated by some 
allocator
                                                // operation which remembers 
its size)
                                                // must not be collected
        template<class T> T* undeclare_reachable(T* p);

void declare_no_pointers(char* p, size_t n); // p[0..n] holds no pointers
        void undeclare_no_pointers(char* p, size_t n);


Reply via email to