From nobody Wed Oct 18 14:08:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9Xl26tgFz4x4FZ; Wed, 18 Oct 2023 14:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9Xl24shKz3FVs; Wed, 18 Oct 2023 14:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697638126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=00xf0MvuGfOz4WROuuY8nGOFvhtugMpdxH5sEo3GL58=; b=nLP4CZJP+We3QjbhHOXZI4Fd8FHFDoRvuIXNFw9PIB0V+OFTEbhT+snwW6dJEEo4uoXW3d WDoFVYltT5HuqXEwpAI25j2d9GzFWeSXqqTfsuz0fNuePmB9fyn6uL+a+xcjO9cbFb9psy Mgty4QV4ufc305Dhed78Z1z8auWgPgj1+UmvjRftiPNEw6844KrZfMAp44p/9dPtwAkn8X c7V7JAu8VuqAXVTJUmTWO0f5jGQMtiLPB9WoSTRI7Qb92t3VMhbh7ZL++7P583zcT60rDw 4c4u6NHfRJZII0X+XM39CGuu8OBETWjteLh+AjvjdaVUp420Mi2D2AIkIVoZuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697638126; a=rsa-sha256; cv=none; b=xDcsuHJj9M1TeH1tnqEXLv/sVIhL4xwx9oYfz7fBGZ9j3fmXCugGETYq+l/KJgXFlV0uHb /e4sBrycvL82+3WBhUvDAGR2+dM5U6cFKGmhv/ebNcHyVA8vwqB0r1UBabg9kT+iHNqWsO 84nYdhtl0pHU8g9I/KXSDyaT1DTaHvWTGLlPOom1N5ld1n7pU5ef3fgjrm+WB/GdrJquhu rI2SkHHmDe1jD6f9mTFoLhwODMndBBw1Z9YdptCDZfQDmgeAqwTaiPxRZiNUuoTzjdeC9U qESdQ9XiV4b0k7BtQksIo/vmWhbuQcXYRS5eKUY57cmZRPjeejB7NmLTxU/e4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697638126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=00xf0MvuGfOz4WROuuY8nGOFvhtugMpdxH5sEo3GL58=; b=tJ8VUAcBVjBML74eUMsS/0hX+HgHU4NytkFONZkLTGULMV3n7ZNdDBj1FMZk86ECinlBoX rjrWszJNNRoSSKsV/35d7X7v9tw0T1zilc/6/iCKXlF4bW/aQWEhFygb/gkr875M8rsY5j 0rjDJ4bHgXKIoCrvMztpEbn/8ahTmB3zMVjbit3H0HjRCZOmopoE6h+jD1ISxSJ22EtGTF yPQitRdTyDWE8JU+Ilkb0YpLRfkUndY/ND5gpFGqmoeDj1a07D5mMc6tNWVNcR/w3u9zOv Hq9qKxFyZq6Qgy+vBATp5Lb6QkvL2SYpYlIa22/pND5/dcxwByQwUV2vsBkgQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S9Xl23fhjz1873; Wed, 18 Oct 2023 14:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39IE8k0q040767; Wed, 18 Oct 2023 14:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IE8kjN040764; Wed, 18 Oct 2023 14:08:46 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:08:46 GMT Message-Id: <202310181408.39IE8kjN040764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a66d27e22fa0 - main - memory(3): Mention more functions. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a66d27e22fa0a6ae42a559d2f58deef88425d795 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a66d27e22fa0a6ae42a559d2f58deef88425d795 commit a66d27e22fa0a6ae42a559d2f58deef88425d795 Author: Dag-Erling Smørgrav AuthorDate: 2023-10-18 14:05:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-18 14:07:46 +0000 memory(3): Mention more functions. Differential Revision: https://reviews.freebsd.org/D42191 --- lib/libc/stdlib/memory.3 | 57 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/lib/libc/stdlib/memory.3 b/lib/libc/stdlib/memory.3 index 143dce488f7e..a8bdd3a3ddf3 100644 --- a/lib/libc/stdlib/memory.3 +++ b/lib/libc/stdlib/memory.3 @@ -27,50 +27,79 @@ .\" .\" @(#)memory.3 8.1 (Berkeley) 6/4/93 .\" -.Dd June 4, 1993 +.Dd October 18, 2023 .Dt MEMORY 3 .Os .Sh NAME -.Nm malloc , +.Nm aligned_alloc , +.Nm alloca , +.Nm calloc , .Nm free , +.Nm malloc , +.Nm posix_memalign , .Nm realloc , -.Nm calloc , -.Nm alloca , -.Nm mmap -.Nd general memory allocation operations +.Nm reallocf , +.Nm valloc , +.Nm mmap , +.Nm munmap +.Nd memory management functions .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In stdlib.h .Ft void * -.Fn malloc "size_t size" +.Fn aligned_alloc "size_t alignment" "size_t size" +.Ft void * +.Fn alloca "size_t size" +.Ft void * +.Fn calloc "size_t nelem" "size_t elsize" .Ft void .Fn free "void *ptr" .Ft void * +.Fn malloc "size_t size" +.Ft int +.Fn posix_memalign "void **ptr" "size_t alignment" "size_t size" +.Ft void * .Fn realloc "void *ptr" "size_t size" .Ft void * -.Fn calloc "size_t nelem" "size_t elsize" +.Fn reallocf "void *ptr" "size_t size" .Ft void * -.Fn alloca "size_t size" +.Fn valloc "size_t size" .In sys/types.h .In sys/mman.h .Ft void * .Fn mmap "void * addr" "size_t len" "int prot" "int flags" "int fd" "off_t offset" +.Ft int +.Fn munmap "void *addr" "size_t len" .Sh DESCRIPTION These functions allocate and free memory for the calling process. They are described in the individual manual pages. .Sh SEE ALSO .Xr mmap 2 , +.Xr aligned_alloc 3 , .Xr alloca 3 , .Xr calloc 3 , .Xr free 3 , .Xr malloc 3 , -.Xr realloc 3 +.Xr posix_memalign 3 , +.Xr realloc 3 , +.Xr reallocf 3 , +.Xr valloc 3 , .Sh STANDARDS -These functions, with the exception of -.Fn alloca +The +.Fn calloc , +.Fn free , +.Fn malloc , and -.Fn mmap -conform to +.Fn realloc +functions conform to .St -isoC . +.Pp +The +.Fn mmap , +.Fn munmap , +and +.Fn posix_memalign +functions conform to +.St -p1003.1-2001 .