new D2.0 + C++ language

BCS ao at pathlink.com
Fri Mar 20 10:00:02 PDT 2009


Reply to Weed,

> Simen Kjaeraas ?????:
> 
>> or disable the GC and enable it
>> when you have the time.
>
> Again, the memory will be overrun)
> 

Are you saying that you have a program with a time critical section that 
allocates 100s of MB of memory? If so, you have other problems to fix. If 
that is not the case, then disable the GC run your critical/RT section allocating 
a few kB/MB and when you exit that section re enable the GC and clean up. 
This won't create a memory overrun unless you allocate huge amounts of memory 
or forget to re enable the GC.

Short version: The only places I can think of where having the GC run would 
cause problems are can't be allowed to run for very long or allocate hardly 
ram at all. To argue this point you will have to give a specific use case.





More information about the Digitalmars-d mailing list