D10 Seattle strange 32 bit issue

delphi package - automated exception handling
Post Reply
softtouch
Posts: 105
Joined: Sat Jun 20, 2009 10:08 am
Contact:

D10 Seattle strange 32 bit issue

Post by softtouch »

I have a strange issue.

When I compile a project as 32 bit, running it in debugger or stand alone, with madExcept enabled, loading files (tstreamreader for example) takes ages and end up with out of memory.
For example, loading an 80MB text file line by line via TStreamReader will never end and loads until I get an out of memory.
Disabling madExcept, and it loads in 1.2 seconds without any issue.

Doing the same with 64 bit, no problem at all, same loading time with or without madExcept.

Now, when I compress the "bad" 32 bit exe with VMProtect, it runs fast again and behave normal.

I am struggling since days with this issue and just cant find a solution.

EDIT: When I turn off "Instantly crash on buffer... (Overrun checked), its normal again.

The project has about 1mio. lines of code, 670+ units.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: D10 Seattle strange 32 bit issue

Post by madshi »

The "instantly crash" feature results in using a different memory manager which has to do some extra work for every allocation you do. If you're doing a lot of very small allocations and reallocations, this can result in a big slowdown. The "instantly crash" feature is not intended to be kept turned on at all times. It's purpose is to be activated once in a while to check for possible buffer overrun/underrun bugs in your code. Same as leak reporting, it's also not supposed to be enabled all the time.

Hope that helps?
softtouch
Posts: 105
Joined: Sat Jun 20, 2009 10:08 am
Contact:

Re: D10 Seattle strange 32 bit issue

Post by softtouch »

Yes, it does help, that make things clear. Thanks a lot!
Post Reply