shithub: flite

Download patch

ref: faa16235233e07de72f1dd38630ab358bc8141da
parent: e98804740dd0d36ee04d710dc0859d31aa0126a5
author: Elbeeo <elbeeo@gmail.com>
date: Mon Feb 11 14:00:16 EST 2019

Add method to override memory operations for an application

--- a/src/utils/cst_alloc.c
+++ b/src/utils/cst_alloc.c
@@ -64,6 +64,8 @@
 #endif
 #endif
 
+#ifndef CST_USER_MALLOC	/* Define to override cst_safe_alloc, cst_safe_calloc, cst_safe_realloc, cst_free */
+
 void *cst_safe_alloc(int size)
 {
     /* returns pointer to memory all set 0 */
@@ -185,6 +187,8 @@
 #endif
     }
 }
+
+#endif
 
 #ifdef CST_DEBUG_MALLOC_TRACE