On Tuesday, 7 May 2013 at 23:58:53 UTC, Ali Çehreli wrote:
On 05/07/2013 04:42 PM, Matic Kukovec wrote:
> On Tuesday, 7 May 2013 at 23:31:41 UTC, Ali Çehreli wrote:
>> On 05/07/2013 04:18 PM, Matic Kukovec wrote:
>>
>> > On Tuesday, 7 May 2013 at 23:14:20 UTC, Ali Çehreli wrote:
>> >> GC.minimize() may work.
>>
>> > Tried it, no changes.
>>
>> Works for your test program under Linux but as the
documentation says,
>> it is not guaranteed to have any effect at all.
>>
>> Ali
>
> I found this problem with a program that reads a large xml
file (250000+
> lines), then stores the lines in a string[], does a
comparison with
> another array and finally clears the original array.
You don't need to clear the original array but it should be
harmless.
> On the second or third file I always get an OutOfMemoryError,
when the
> Task Manager shows about 1.3GB memory usage.
>
> Is this a Windows specific thing or am I doing something
wrong?
Is this a 32-bit platform? If so, the reason may be the
conservative GC that dmd uses. What happens is, unrelated
32-bit values in other parts of the program may look like
pointers into the allocated space and the GC thinks that they
are still in use.
Ali
The system is Windows Vista 64bit. DMD is 2.062.