calloc/free problem - Can QSSL please comment?

Hi again

September 18th I posted about a calloc/free problem I’m having. Can someone
from QSSL please comment my post?

I’m especially interested in knowing if the problem I’m having is related to
an entry in the knowledge base:
(http://qdn.qnx.com/support/bok/solution.qnx?6847 )

The allocator is likely running past an allocated segment. This issue has
come up before, and it has been recommended to look into some form of
“Mem-Alloc checker”. There is an alternative malloc available in the
Contributed Software section of our website in the directory qnx4/os/libs.
The file is called ‘libmalloc3r.tgz’.

When has this issue come up? Who should look into an “Mem-Alloc checker”?
QSSL or the user?

Thanks in advance,
P-O Håkansson

“P-O Hakansson” <par-olof.hakansson@gambro.com> wrote:

Hi again

I’m especially interested in knowing if the problem I’m having is related to
an entry in the knowledge base:
(> http://qdn.qnx.com/support/bok/solution.qnx?6847 > )

It’s quite possible that is the case.

The allocator is likely running past an allocated segment. This issue has
come up before, and it has been recommended to look into some form of
“Mem-Alloc checker”. There is an alternative malloc available in the
Contributed Software section of our website in the directory qnx4/os/libs.
The file is called ‘libmalloc3r.tgz’.

When has this issue come up? Who should look into an “Mem-Alloc checker”?
QSSL or the user?

If the allocation scheme done by the Watcom libs isn’t what you expect, then
you should look into geting a different mallocing scheme as pointed to in the
knowledge base.

-Adam

I did not spent the time to analyze your prior post, but from my
experience, the default allocator doesn’t mess up unless you
are use mmap() or older functions for sharing memory, and then
want to release memory back to the system. The alternate allocator
you mention can handle that. I suspect your program is overwriting
memory and trashing some of the heap management data. Look at the
_heapcheck() and _heapwalk() functions. I had written a little
function using these that I could call periodically in my progs
or from the debugger.

There are libraries out there that are more thorough and convenient.
I think some are freeware, but I have used Memcheck and found it
helped a lot. Neither of these methods are perfect for detecting
exactly where your program is overwriting, but they may tell you
what is being overwritten so you can use the debugger to trap
writes to that location.

Good luck.

Operating System for Tech Supp wrote:

“P-O Hakansson” <> par-olof.hakansson@gambro.com> > wrote:
Hi again

I’m especially interested in knowing if the problem I’m having is related to
an entry in the knowledge base:
(> http://qdn.qnx.com/support/bok/solution.qnx?6847 > )

It’s quite possible that is the case.

The allocator is likely running past an allocated segment. This issue has
come up before, and it has been recommended to look into some form of
“Mem-Alloc checker”. There is an alternative malloc available in the
Contributed Software section of our website in the directory qnx4/os/libs.
The file is called ‘libmalloc3r.tgz’.

When has this issue come up? Who should look into an “Mem-Alloc checker”?
QSSL or the user?

If the allocation scheme done by the Watcom libs isn’t what you expect, then
you should look into geting a different mallocing scheme as pointed to in the
knowledge base.

-Adam