memory allocation / initialization of allocated memory
Simeon Nifos
archwndas at yahoo.com
Sun May 15 02:55:22 PDT 2005
Dear list,
I just encountered something which may cause problems
to debugging memory allocation. You see I had a C code
with a lot of memory allocation/deallocation
instructions
and indirect addressing. Unfortunately I had 3 bugs
there. Running under Linux the compiler reported
*** glibc detected *** free(): invalid pointer:
0x08056aa8 ***
This was not however the case with FreeBSD 4.11,
5.4 which didn't have a problem. Testing a simple
program which allocates doubles and/or ints I realized
that FreeBSD automatically initializes to zero the
memory which is allocated by malloc. This is default
behaviour I guess and I hope that it can be changed.
Otherwise we have problems tracking memory allocation
errors in buggy code.
Could somebody let me know how to change this default
behaviour?
Thanks in advance!
Symeon!
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html
More information about the freebsd-amd64
mailing list