Jump to content

Virgo

Members
  • Content Count

    86
  • Joined

  • Last visited

Posts posted by Virgo


  1. 9 minutes ago, Fr0sT.Brutal said:

    TList grows its internal array by some factor (1.5 IIRC). So if you use just Add, there are big chances that list will have free space at the end of test

    Probably depends on Delphi version. In XE it grows by 1 TList<T>.Add.

    Or not. I did not check the content of Grow.... It doubles in size in XE. But it can still cause memory fragmentation, if reallocation has to relocate memory block.

     


  2. What happens, if you add

    vDataList.Capacity := vMax;

    before filling vDataList.

    vDataList is using array internally, but it is constantly grown in your example. It might be the cause of those issues.

    Also, you really should run those test so, that one test is only one run on that execution of test program. Otherwise testing array might make use of memory that was already allocated  during list testing (Delphi memory manager does not return memory to windows, when it is freed.

    • Like 1
    • Thanks 1

  3. Random EInvalidOp.... If you can use Jcl, then using Jcl8087 unit you could try adding

        Set8087ControlWord(Default8087CW);
        ClearPending8087Exceptions;

    before the location, where error appears. For us it helped work around about some buggy printer drivers.

    Also, if you happen to be using FastMM4 memory manager in FullDebugMode, then we have had random EInvalidOps with RawStackTraces on.

×