Skip to content

Commit

Permalink
Get rid of config check for 16 byte aligned malloc. All current imple…
Browse files Browse the repository at this point in the history
…mentations do this.
  • Loading branch information
insertinterestingnamehere committed Sep 16, 2024
1 parent aaa085e commit 7b289d1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 72 deletions.
66 changes: 0 additions & 66 deletions config/ax_check_16aligned_malloc.m4

This file was deleted.

2 changes: 0 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,6 @@ QTHREAD_CHECK_QSORT
AC_CHECK_DECLS([MADV_ACCESS_LWP],[],[],[[#include <sys/types.h>
#include <sys/mman.h>]])
AX_CHECK_PAGE_ALIGNED_MALLOC
AX_CHECK_16ALIGNED_MALLOC
AX_CHECK_16ALIGNED_CALLOC
QTHREAD_CHECK_WORKING_VALLOC
QTHREAD_CHECK_ASSERT([],[AC_MSG_ERROR([assert() does not seem to work])])

Expand Down
4 changes: 0 additions & 4 deletions src/alloc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ void *qt_internal_aligned_alloc(size_t alloc_size, uint_fast16_t alignment) {
assert(alloc_size > 0);
switch (alignment) {
case 0: ret = MALLOC(alloc_size); break;
#if defined(HAVE_16ALIGNED_MALLOC)
case 16:
case 8:
case 4:
case 2: ret = MALLOC(alloc_size); break;
#endif
default:
#if defined(HAVE_WORKING_VALLOC)
if (alignment == pagesize) {
Expand Down Expand Up @@ -80,12 +78,10 @@ void qt_internal_aligned_free(void *ptr, uint_fast16_t alignment) {
assert(ptr);
switch (alignment) {
case 0: qt_free(ptr); break;
#if defined(HAVE_16ALIGNED_MALLOC)
case 16:
case 8:
case 4:
case 2: qt_free(ptr); break;
#endif
default:
#if defined(HAVE_WORKING_VALLOC) || defined(HAVE_PAGE_ALIGNED_MALLOC)
if (alignment == pagesize) {
Expand Down

0 comments on commit 7b289d1

Please sign in to comment.