[asterisk-dev] [Code Review] MALLOC_HOLD for debugging memory

Michiel van Baak michiel at vanbaak.info
Wed Jul 29 12:13:00 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/309/#review1003
-----------------------------------------------------------


Couldn't find it in the attached diffs, but it's in your branch:
As discussed on IRC:

memalign and posix_memalign are not part of 4.4BSD.
On those systems, malloc properly aligns the allocated space, so it should be sufficient.

OSX has valloc so that can be used there.

- Michiel


On 2009-07-28 10:44:14, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/309/
> -----------------------------------------------------------
> 
> (Updated 2009-07-28 10:44:14)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> MALLOC_HOLD is an optional compile-time definition used to detect memory corruption.  It does this in a similar way to valgrind, although it does not slow down Asterisk appreciably (although the memory will grow somewhat larger than normal).
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/main/config.c 208082 
> 
> Diff: https://reviewboard.asterisk.org/r/309/diff
> 
> 
> Testing
> -------
> 
> Extensive testing with an idle system.  (While this sounds like an oxymoron, because this is dealing with memory management, there are a ton of memory requests merely during startup routines.  Also, idle for me means 'not heavy load' but did include testing with several active IAX2 calls.)
> 
> 
> Thanks,
> 
> Tilghman
> 
>




More information about the asterisk-dev mailing list