summaryrefslogtreecommitdiff
path: root/codecs
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2015-05-12 09:58:52 -0400
committerCorey Farrell <git@cfware.com>2015-05-13 21:55:07 -0400
commit478fb4a388afcb56e7e50184c996f0838d609a66 (patch)
tree7a09c1698a458a65e6703fcee59f64ec6afeed38 /codecs
parent3858e67dd549cf600fe1ed0c814affd9fb64c708 (diff)
MALLOC_DEBUG: Replace WRAP_LIBC_MALLOC with ASTMM_LIBC.
There are 3 ways that calls directly to standard allocator functions can be dealt with: 1. Block their use, cause them to generate an error. This is the default. 2. Replace them with the Asterisk equivalent function calls. 3. Leave them alone. This change allows one of these 3 options to be selected by any source. The source just needs to define ASTMM_LIBC to ASTMM_BLOCK, ASTMM_REDIRECT, or ASTMM_IGNORE to use option 1, 2 or 3 respectively. Normally ASTMM_BLOCK is the correct option, so it is default when ASTMM_LIBC is not defined. In some cases when building 3rd party code it is desirable to have it use Asterisk functions, without changing the whole source - ASTMM_REDIRECT accomplishes this. When using 3rd party libraries sometimes a static inline function will make use of malloc or free. In these cases it may be unsafe to replace the allocator in the header, as it's possible the memory could be freed by the library using standard allocators. For those cases ASTMM_IGNORE is needed. Change-Id: I8afef4bc7f3b93914263ae27d3a5858b69663fc7
Diffstat (limited to 'codecs')
-rw-r--r--codecs/lpc10/lpcini.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/codecs/lpc10/lpcini.c b/codecs/lpc10/lpcini.c
index 8efb64068..ea68176e3 100644
--- a/codecs/lpc10/lpcini.c
+++ b/codecs/lpc10/lpcini.c
@@ -34,7 +34,7 @@ Some OSS fixes and a few lpc changes to make it actually work
-lf2c -lm (in that order)
*/
-#define WRAP_LIBC_MALLOC
+#define ASTMM_LIBC ASTMM_REDIRECT
#include "asterisk.h"
#include "f2c.h"