All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonny Grant <jg@jguk.org>
To: linux-man <linux-man@vger.kernel.org>
Subject: should free() refer to posix_memalign?
Date: Fri, 8 Oct 2021 12:19:42 +0100	[thread overview]
Message-ID: <177c3be6-6bab-7e55-6fa5-fc0fc33ff3b2@jguk.org> (raw)

Hello

https://man7.org/linux/man-pages/man3/malloc.3.html

"The free() function frees the memory space pointed to by ptr,
 which must have been returned by a previous call to malloc(),
 calloc(), or realloc().  "


Could this list refer to the other ways memory can be allocated too? free() accepts other memory.
posix_memalign
aligned_alloc
memalign
valloc
pvalloc
reallocarray

That would be changing it to say :-

"The free() function frees the memory space pointed to by ptr,
 which must have been returned by a previous call to malloc(),
 calloc(), realloc(), posix_memalign(), aligned_alloc(), memalign(), valloc(), reallocarray() or pvalloc()"

https://man7.org/linux/man-pages/man3/posix_memalign.3.html

Kind regards
Jonny

             reply	other threads:[~2021-10-08 11:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 11:19 Jonny Grant [this message]
2021-10-08 12:30 ` should free() refer to posix_memalign? Alejandro Colomar (man-pages)
2021-10-08 13:28   ` Jonny Grant
2021-10-08 14:58     ` Alejandro Colomar (man-pages)
2021-10-08 17:57       ` Jonny Grant
2021-10-09 18:39         ` Alejandro Colomar (man-pages)
2021-10-09 20:15           ` Jonny Grant

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=177c3be6-6bab-7e55-6fa5-fc0fc33ff3b2@jguk.org \
    --to=jg@jguk.org \
    --cc=linux-man@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.