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 -- http://home.pages.de/~Peter.Gerwinski/ - G-N-U GmbH: http://www.g-n-u.de Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118 GnuPG key fingerprint: 9E7C 0FC4 8A62 5536 1730 A932 9834 65DB 2143 9422 keys: ftp://ftp.gerwinski.de/pub/keys/ - AntiSpam: http://spam.abuse.net