Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21337

fix aligned_malloc()

    XMLWordPrintable

Details

    Description

      inline void* aligned_malloc(size_t size, size_t align) {
          void *result;
      #ifdef _MSC_VER
          result = _aligned_malloc(size, align);
      #elif defined (HAVE_POSIX_MEMALIGN)
          if(posix_memalign(&result, align, size)) {
      	    result = 0;
          }
      #else
          /* Use unaligned malloc as fallback */
          result = malloc(size);
      #endif
          return result;
      }
      

      This function should always return aligned buffer, as it's name states.

      Attachments

        Activity

          People

            kevg Eugene Kosov (Inactive)
            kevg Eugene Kosov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.