Khimenko Victor wrote:
non_collectable_ptr=(struct some_struct *)malloc(sizeof(some_struct)); collectable_ptr=(struct some_struct *)GC_malloc(sizeof(some_struct)); ptrfree_ptr=(char *)GC_malloc_atomic(BUFFER_SIZE);
What's the difference between GC_malloc() and GC_malloc_atomic()?
What's pascal equivalent ? I repeat: I can understood that if I'll replace malloc with gc_alloc globally GPC's new will work just fine. But how I can use GC and old tried malloc/free in ONE program ?
I'd suggest to write two procedures to flip the hook between normal allocation and using the GC. I also see that this makes problems with threads ... have to think about that ...
Peter