summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2018-08-25 22:48:05 +0200
committerMarcus Müller <marcus@hostalia.de>2018-08-27 18:58:36 +0200
commit0c024207b2ce3d10982e9d8912096afcfbdb925e (patch)
treebb5348dc8378e70cb8dcc153b585060d2fed7cd6 /gnuradio-runtime/lib
parent4b40c1841501df0c0ddc508a973eb2e2fea092b0 (diff)
Removed unused `malloc16Aligned` and consorts
This was Code by the great Phil Karn, but whoever needs aligned memory will go through volk or their OS' tools, anyways. None of this code was used in-tree anywhere.
Diffstat (limited to 'gnuradio-runtime/lib')
-rw-r--r--gnuradio-runtime/lib/CMakeLists.txt1
-rw-r--r--gnuradio-runtime/lib/malloc16.c46
-rw-r--r--gnuradio-runtime/lib/malloc16.h37
3 files changed, 0 insertions, 84 deletions
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt
index 7cd5920538..eee34f01ee 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -89,7 +89,6 @@ list(APPEND gnuradio_runtime_sources
io_signature.cc
local_sighandler.cc
logger.cc
- malloc16.c
message.cc
misc.cc
msg_accepter.cc
diff --git a/gnuradio-runtime/lib/malloc16.c b/gnuradio-runtime/lib/malloc16.c
deleted file mode 100644
index 2cc6135e77..0000000000
--- a/gnuradio-runtime/lib/malloc16.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Wrapper functions for malloc/free that force 16-byte alignment
- * See http://perso.club-internet.fr/matmac/sourcesc.htm
-
- * Copyright 2001 Phil Karn, KA9Q
- * May be used under the terms of the GNU Public License (GPL)
- */
-
-#include "malloc16.h"
-#include <string.h>
-
-void *malloc16Align(int size){
- void *p;
- void **p1;
-
- if((p = malloc(size+31)) == NULL)
- return NULL;
-
- /* Round up to next 16-byte boundary */
- p1 = (void **)(((long)p + 31) & (~15));
-
- /* Stash actual start of block just before ptr we return */
- p1[-1] = p;
-
- /* Return 16-byte aligned address */
- return (void *)p1;
-}
-
-void *calloc16Align(size_t nmemb,size_t size){
- int nbytes;
- void *p;
-
- nbytes = nmemb*size;
- if((p = malloc16Align(nbytes)) == NULL)
- return NULL;
-
- memset(p,0,nbytes);
- return p;
-}
-
-void free16Align(void *p){
-
- if(p != NULL){
- /* Retrieve pointer to actual start of block and free it */
- free(((void **)p)[-1]);
- }
-}
diff --git a/gnuradio-runtime/lib/malloc16.h b/gnuradio-runtime/lib/malloc16.h
deleted file mode 100644
index 05f80cbf4f..0000000000
--- a/gnuradio-runtime/lib/malloc16.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#include <gnuradio/api.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdlib.h>
-
-GR_RUNTIME_API void *malloc16Align(int size);
-GR_RUNTIME_API void *calloc16Align(size_t nmemb,size_t size);
-GR_RUNTIME_API void free16Align(void *p);
-
-#ifdef __cplusplus
-}
-#endif