switch off GC?
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Wed Feb 4 06:38:29 PST 2009
Tim M wrote:
> On Wed, 04 Feb 2009 15:38:45 +1300, Weed <resume755 at mail.ru> wrote:
>
>> It is possible to disable GC?
>>
>> That it has not been included in result binary for an increasing
>> performance of ref operations and reduction of the size of the binary
>>
>> I have not found the answer in google.
>
>
> To anyone here that disables there GC: Whats you reason for doing this?
> (Note: I don't want to know possible requirements but just your reason
> just out of interest)
I've never attempted to remove it entirely, but have often disabled it.
There are two basic scenarios where I've done this. One, where I have
a block of code that either really needs to run at full speed or just
plain allocates a whole lot of memory in multiple chunks. In this case,
I am delaying the inevitable collection run.
The second case, is a program of mine that expects to run for very long
periods (months, if all goes well), and also needs to be very responsive
to work right. In this case, I keep the GC disabled and trigger
collections at my own choice of key moments (database checkpoints, etc)
where responsiveness is /expected/ to be temporarily lacking.
-- Chris Nicholson-Sauls
More information about the Digitalmars-d-learn
mailing list