Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avutil/mem: use C11 aligned_malloc()
Date: Mon, 19 Feb 2024 01:08:18 +0100
Message-ID: <20240219000818.GQ6420@pb2> (raw)
In-Reply-To: <20240218161636.15649-1-jamrial@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1396 bytes --]

On Sun, Feb 18, 2024 at 01:16:36PM -0300, James Almer wrote:
> Save for the Microsoft C Runtime library, where free() can't handle aligned
> buffers, aligned_malloc() should be available and working on all supported
> targets.
> Also, malloc() alone may be sufficient if alignment requirement is low, so add
> a check for it.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  configure       |  2 --
>  libavutil/mem.c | 42 ++++++------------------------------------
>  2 files changed, 6 insertions(+), 38 deletions(-)

This breaks build here

libavutil/mem.c: In function ‘av_malloc’:
libavutil/mem.c:108:15: error: implicit declaration of function ‘aligned_malloc’; did you mean ‘aligned_alloc’? [-Werror=implicit-function-declaration]
         ptr = aligned_malloc(size, ALIGN);
               ^~~~~~~~~~~~~~
               aligned_alloc
libavutil/mem.c:108:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
         ptr = aligned_malloc(size, ALIGN);
             ^
cc1: some warnings being treated as errors
ffbuild/common.mak:81: recipe for target 'libavutil/mem.o' failed

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2024-02-19  0:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18 16:16 James Almer
2024-02-18 16:27 ` Andreas Rheinhardt
2024-02-18 16:29   ` James Almer
2024-02-18 18:39     ` Rémi Denis-Courmont
2024-02-18 18:35   ` Rémi Denis-Courmont
2024-02-18 18:37 ` Rémi Denis-Courmont
2024-02-19  0:08 ` Michael Niedermayer [this message]
2024-02-19  1:37   ` James Almer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240219000818.GQ6420@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git