summaryrefslogtreecommitdiffstats
path: root/src/viterbi_gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/viterbi_gen.c')
-rw-r--r--src/viterbi_gen.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/viterbi_gen.c b/src/viterbi_gen.c
index 7972c396..2ced6152 100644
--- a/src/viterbi_gen.c
+++ b/src/viterbi_gen.c
@@ -20,6 +20,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <stdlib.h>
#include <stdint.h>
#include <string.h>
@@ -126,6 +127,19 @@ static void gen_path_metrics(int num_states, int16_t *sums,
memcpy(sums, new_sums, num_states * sizeof(int16_t));
}
+/* Not-aligned Memory Allocator */
+__attribute__ ((visibility("hidden")))
+int16_t *osmo_conv_vdec_malloc(size_t n)
+{
+ return (int16_t *) malloc(sizeof(int16_t) * n);
+}
+
+__attribute__ ((visibility("hidden")))
+void osmo_conv_vdec_free(int16_t *ptr)
+{
+ free(ptr);
+}
+
/* 16-state branch-path metrics units (K=5) */
__attribute__ ((visibility("hidden")))
void osmo_conv_gen_metrics_k5_n2(const int8_t *seq, const int16_t *out,