Page 1 of 1

Memory Corruption in Large App

Posted: Thu Apr 27, 2017 11:28 pm
by mattg
Hi

are there any options to help locate a memory corruption in a large app (enabling buffer overrun i get an E-Out of Memory error on startup) app runs at about 900MB then gets the error. Normal memory usage is 80-90MB.

Ta
Matt

Re: Memory Corruption in Large App

Posted: Sat May 06, 2017 5:49 pm
by madshi
Hi there,

and sorry for the late reply.

Hmmmm... Buffer overrun alone already triggers Out of Memory? Leak reporting is still disabled? Is your EXE large address aware? If not, maybe enabling that could help avoid the Out of memory problem? If that doesn't help, maybe you can find a way to avoid some allocations? It's especially many small allocations which are costly. Basically if you allocate just 1 byte, madExcept has to spend 8KB of your address space on that. Half of that (4KB) is allocated, the rest reserved. If you allocate one 80-90MB chunk, that's not a problem at all. But if you allocate 80-90 million small buffers, you'll run out of memory, when using the buffer overrun detection in madExcept.

Unfortunately right now I don't have any other option to offer. I'm planning to make the buffer overrun detection 64bit capable in the next major madExcept upgrade, to avoid the buffer overrun problem. But atm the feature only supports 32bit, sadly.