Hello All,
I am porting some C code developed in Windows to QNX. The code works fine in
the Windows environment however in QNX I get a memory fault. I believe I
have pinpointed the error to a free statement, but I could be wrong. Is
there any thing I should know about memory allocations that might be
different from the way memory is allocated, if so, what would be a good
resource to check out.
Thanks in advance,
Elmer Thomas
Computer Engineer
University of California, Riverside
ethomas@cs.ucr.edu
Elmer Thomas <ethomas@cs.ucr.edu> wrote:
: Hello All,
: I am porting some C code developed in Windows to QNX. The code works fine in
: the Windows environment however in QNX I get a memory fault. I believe I
If you run it say on a Solaris box, does it still work fine?
: have pinpointed the error to a free statement, but I could be wrong. Is
: there any thing I should know about memory allocations that might be
: different from the way memory is allocated, if so, what would be a good
: resource to check out.
You most likely trashing the memory allocator internal list. It maybe
because of a buffer overrun or trying to free a pointer twice etc …
It did not show on Windows, probably because the memory allocator
is more “forgiven”.
My experience tells me that most people get hit when doing small
allocations in a range between 1…15 and overrun the buffer.
Nto memory allocator is unforgiven for this. While for other allocator
because of padding etc the problem can go unnotice.
–
au revoir, alain
Aussi haut que l’on soit assis, on n’est toujours assis que sur son cul !!!