aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-13 15:16:59 +0100
committerDavid Robillard <d@drobilla.net>2020-11-13 15:17:42 +0100
commit49bee1f121054802d7dc5f5a84ecde93d7002d20 (patch)
treeb143e161ef6894fd8ebc7fb46d54154901e7c052
parent9256bf1de45a39fb521f15361965a684af912975 (diff)
downloadserd-49bee1f121054802d7dc5f5a84ecde93d7002d20.tar.gz
serd-49bee1f121054802d7dc5f5a84ecde93d7002d20.tar.bz2
serd-49bee1f121054802d7dc5f5a84ecde93d7002d20.zip
Remove dead code
-rw-r--r--src/system.c19
-rw-r--r--src/system.h3
2 files changed, 0 insertions, 22 deletions
diff --git a/src/system.c b/src/system.c
index fbff8806..a371e548 100644
--- a/src/system.c
+++ b/src/system.c
@@ -34,10 +34,6 @@
#include <stdlib.h>
#include <string.h>
-#define SERD_HAVE_ALIGNED_ALLOCATION \
- defined(_WIN32) || defined(HAVE_ALIGNED_ALLOC) || \
- defined(HAVE_POSIX_MEMALIGN)
-
FILE*
serd_fopen(const char* path, const char* mode)
{
@@ -71,21 +67,6 @@ serd_malloc_aligned(const size_t alignment, const size_t size)
}
void*
-serd_calloc_aligned(const size_t alignment, const size_t size)
-{
-#ifdef SERD_HAVE_ALIGNED_ALLOCATION
- void* const ptr = serd_malloc_aligned(alignment, size);
- if (ptr) {
- memset(ptr, 0, size);
- }
- return ptr;
-#else
- (void)alignment;
- return calloc(1, size);
-#endif
-}
-
-void*
serd_allocate_buffer(const size_t size)
{
return serd_malloc_aligned(SERD_PAGE_SIZE, size);
diff --git a/src/system.h b/src/system.h
index 60095a5b..57203820 100644
--- a/src/system.h
+++ b/src/system.h
@@ -27,9 +27,6 @@ FILE* serd_fopen(const char* path, const char* mode);
/// Allocate a buffer aligned to `alignment` bytes
SERD_MALLOC_FUNC void* serd_malloc_aligned(size_t alignment, size_t size);
-/// Allocate a zeroed buffer aligned to `alignment` bytes
-SERD_MALLOC_FUNC void* serd_calloc_aligned(size_t alignment, size_t size);
-
/// Allocate an aligned buffer for I/O
SERD_MALLOC_FUNC void* serd_allocate_buffer(size_t size);