| 1 |
# Korean translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# 정강훈 <[email protected]>, 2001. |
| 5 |
# 한글 Manpage 프로젝트 <http://man.kldp.org>, 2005. |
| 6 |
msgid "" |
| 7 |
msgstr "" |
| 8 |
"Project-Id-Version: manpages-l10n\n" |
| 9 |
"POT-Creation-Date: 2026-06-05 06:30+0200\n" |
| 10 |
"PO-Revision-Date: 2005-02-10508:57+0900\n" |
| 11 |
"Last-Translator: 한글 Manpage 프로젝트 <http://man.kldp.org>\n" |
| 12 |
"Language-Team: Korean <[email protected]>\n" |
| 13 |
"Language: ko\n" |
| 14 |
"MIME-Version: 1.0\n" |
| 15 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 16 |
"Content-Transfer-Encoding: 8bit\n" |
| 17 |
"Plural-Forms: nplurals=1; plural=0;\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "malloc" |
| 24 |
msgstr "malloc" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 28 |
#: opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "2026-02-08" |
| 31 |
msgstr "2026년 2월 8일" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "Linux man-pages 6.18" |
| 38 |
|
| 39 |
#. type: SH |
| 40 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 41 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 42 |
#, no-wrap |
| 43 |
msgid "NAME" |
| 44 |
msgstr "이름" |
| 45 |
|
| 46 |
#. type: Plain text |
| 47 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 48 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 49 |
msgid "" |
| 50 |
"malloc, free, calloc, realloc, reallocarray - allocate and free dynamic " |
| 51 |
"memory" |
| 52 |
msgstr "malloc, free, calloc, realloc, reallocarray - 동적 메모리 할당 및 해제" |
| 53 |
|
| 54 |
#. type: SH |
| 55 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 56 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 57 |
#, no-wrap |
| 58 |
msgid "LIBRARY" |
| 59 |
msgstr "라이브러리" |
| 60 |
|
| 61 |
#. type: Plain text |
| 62 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 63 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 64 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 65 |
msgstr "표준 C 라이브러리 (I<libc>,\\ I<-lc>)" |
| 66 |
|
| 67 |
#. type: SH |
| 68 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 69 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 70 |
#, no-wrap |
| 71 |
msgid "SYNOPSIS" |
| 72 |
msgstr "요약" |
| 73 |
|
| 74 |
#. type: Plain text |
| 75 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 76 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 77 |
#, no-wrap |
| 78 |
msgid "B<#include E<lt>stdlib.hE<gt>>\n" |
| 79 |
msgstr "B<#include E<lt>stdlib.hE<gt>>\n" |
| 80 |
|
| 81 |
#. type: Plain text |
| 82 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 83 |
#: opensuse-tumbleweed |
| 84 |
#, fuzzy, no-wrap |
| 85 |
#| msgid "" |
| 86 |
#| "B<void *malloc(size_t >I<size>B<);>\n" |
| 87 |
#| "B<void free(void >I<*ptr>B<);>\n" |
| 88 |
#| "B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 89 |
#| "B<void *realloc(void >I<*ptr>B<, size_t >I<size>B<);>\n" |
| 90 |
#| "B<void *reallocarray(void >I<*ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 91 |
msgid "" |
| 92 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 93 |
"B<void free(void *_Nullable >I<p>B<);>\n" |
| 94 |
"B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 95 |
"B<void *realloc(void *_Nullable >I<p>B<, size_t >I<size>B<);>\n" |
| 96 |
"B<void *reallocarray(void *_Nullable >I<p>B<, size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 97 |
msgstr "" |
| 98 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 99 |
"B<void free(void >I<*ptr>B<);>\n" |
| 100 |
"B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 101 |
"B<void *realloc(void >I<*ptr>B<, size_t >I<size>B<);>\n" |
| 102 |
"B<void *reallocarray(void >I<*ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 103 |
|
| 104 |
#. type: Plain text |
| 105 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 106 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 107 |
msgid "" |
| 108 |
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" |
| 109 |
msgstr "c" |
| 110 |
|
| 111 |
#. type: Plain text |
| 112 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 113 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 114 |
msgid "B<reallocarray>():" |
| 115 |
msgstr "B<reallocarray>():" |
| 116 |
|
| 117 |
#. type: Plain text |
| 118 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 119 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 120 |
#, no-wrap |
| 121 |
msgid "" |
| 122 |
" Since glibc 2.29:\n" |
| 123 |
" _DEFAULT_SOURCE\n" |
| 124 |
" glibc 2.28 and earlier:\n" |
| 125 |
" _GNU_SOURCE\n" |
| 126 |
msgstr "" |
| 127 |
|
| 128 |
#. type: SH |
| 129 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 130 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 131 |
#, no-wrap |
| 132 |
msgid "DESCRIPTION" |
| 133 |
msgstr "설명" |
| 134 |
|
| 135 |
#. type: SS |
| 136 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 137 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 138 |
#, no-wrap |
| 139 |
msgid "malloc()" |
| 140 |
msgstr "malloc()" |
| 141 |
|
| 142 |
#. type: Plain text |
| 143 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 144 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 145 |
msgid "" |
| 146 |
"The B<malloc>() function allocates I<size> bytes and returns a pointer to " |
| 147 |
"the allocated memory. I<The memory is not initialized>. If I<size> is 0, " |
| 148 |
"then B<malloc>() returns a unique pointer value that can later be " |
| 149 |
"successfully passed to B<free>(). (See \"Nonportable behavior\" for " |
| 150 |
"portability issues.)" |
| 151 |
msgstr "" |
| 152 |
|
| 153 |
#. type: SS |
| 154 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 155 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 156 |
#, no-wrap |
| 157 |
msgid "free()" |
| 158 |
msgstr "free()" |
| 159 |
|
| 160 |
#. type: Plain text |
| 161 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 162 |
#: opensuse-tumbleweed |
| 163 |
#, fuzzy |
| 164 |
#| msgid "" |
| 165 |
#| "B<free()> frees the memory space pointed to by I<ptr>, which must have " |
| 166 |
#| "been returned by a previous call to B<malloc()>, B<calloc()> or " |
| 167 |
#| "B<realloc()>. Otherwise, or if B<free(>I<ptr>B<)> has already been " |
| 168 |
#| "called before, undefined behaviour occurs. If I<ptr> is B<NULL>, no " |
| 169 |
#| "operation is performed." |
| 170 |
msgid "" |
| 171 |
"The B<free>() function frees the memory space pointed to by I<p>, which " |
| 172 |
"must have been returned by a previous call to B<malloc>() or related " |
| 173 |
"functions. Otherwise, or if I<p> has already been freed, undefined behavior " |
| 174 |
"occurs. If I<p> is NULL, no operation is performed." |
| 175 |
msgstr "" |
| 176 |
"B<free()> 는 B<malloc()>, B<calloc()> 또는 B<realloc()> 에 대한 호출시 반환되" |
| 177 |
"는 I<ptr> 이 가리키는 메모리 공간을 해제한다. 그렇지 않고, 만일 " |
| 178 |
"B<free(>I<ptr>B<)> 가 전에 이미 호출되었다면, 정의되지 않은 행동이 일어난" |
| 179 |
"다. 만일 I<ptr> 이 B<NULL> 이라면, 어떤 작동도 행해지지 않는다." |
| 180 |
|
| 181 |
#. type: SS |
| 182 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 183 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 184 |
#, no-wrap |
| 185 |
msgid "calloc()" |
| 186 |
msgstr "calloc()" |
| 187 |
|
| 188 |
#. type: Plain text |
| 189 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 190 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 191 |
#, fuzzy |
| 192 |
#| msgid "" |
| 193 |
#| "B<calloc()> allocates memory for an array of I<nmemb> elements of I<size> " |
| 194 |
#| "bytes each and returns a pointer to the allocated memory. The memory is " |
| 195 |
#| "set to zero." |
| 196 |
msgid "" |
| 197 |
"The B<calloc>() function allocates memory for an array of I<n> elements of " |
| 198 |
"I<size> bytes each and returns a pointer to the allocated memory. The " |
| 199 |
"memory is set to zero. If I<n> or I<size> is 0, then B<calloc>() returns a " |
| 200 |
"unique pointer value that can later be successfully passed to B<free>()." |
| 201 |
msgstr "" |
| 202 |
"B<calloc()> 함수는 원소의 크기가 I<size> 바이트인 I<nmemb> 개의 원소로 이루어" |
| 203 |
"진 배열을 위한 메모리를 할당하고 할당된 메모리에 대한 포인터를 반환한다. 메" |
| 204 |
"모리는 0 으로 설정된다." |
| 205 |
|
| 206 |
#. type: Plain text |
| 207 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 208 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 209 |
msgid "" |
| 210 |
"If the multiplication of I<n> and I<size> would result in integer overflow, " |
| 211 |
"then B<calloc>() returns an error. By contrast, an integer overflow would " |
| 212 |
"not be detected in the following call to B<malloc>(), with the result that " |
| 213 |
"an incorrectly sized block of memory would be allocated:" |
| 214 |
msgstr "" |
| 215 |
|
| 216 |
#. type: Plain text |
| 217 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 218 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 219 |
#, fuzzy, no-wrap |
| 220 |
#| msgid "malloc(nmemb * size);\n" |
| 221 |
msgid "malloc(n * size);\n" |
| 222 |
msgstr "malloc(nmemb * size);\n" |
| 223 |
|
| 224 |
#. type: SS |
| 225 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 226 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 227 |
#, no-wrap |
| 228 |
msgid "realloc()" |
| 229 |
msgstr "realloc()" |
| 230 |
|
| 231 |
#. type: Plain text |
| 232 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 233 |
#: opensuse-tumbleweed |
| 234 |
msgid "" |
| 235 |
"The B<realloc>() function changes the size of the memory block pointed to " |
| 236 |
"by I<p> to I<size> bytes. The contents of the memory will be unchanged in " |
| 237 |
"the range from the start of the region up to the minimum of the old and new " |
| 238 |
"sizes. If the new size is larger than the old size, the added memory will " |
| 239 |
"I<not> be initialized." |
| 240 |
msgstr "" |
| 241 |
|
| 242 |
#. type: Plain text |
| 243 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 244 |
#: opensuse-tumbleweed |
| 245 |
msgid "" |
| 246 |
"If I<p> is NULL, then the call is equivalent to I<malloc(size)>, for all " |
| 247 |
"values of I<size>." |
| 248 |
msgstr "" |
| 249 |
|
| 250 |
#. type: Plain text |
| 251 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 252 |
#: opensuse-tumbleweed |
| 253 |
msgid "" |
| 254 |
"If I<size> is equal to zero, and I<p> is not NULL, then the call is " |
| 255 |
"equivalent to I<free(p)> (but see \"Nonportable behavior\" for portability " |
| 256 |
"issues)." |
| 257 |
msgstr "" |
| 258 |
|
| 259 |
#. type: Plain text |
| 260 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 261 |
#: opensuse-tumbleweed |
| 262 |
msgid "" |
| 263 |
"Unless I<p> is NULL, it must have been returned by an earlier call to " |
| 264 |
"B<malloc> or related functions. If the area pointed to was moved, a " |
| 265 |
"I<free(p)> is done." |
| 266 |
msgstr "" |
| 267 |
|
| 268 |
#. type: SS |
| 269 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 270 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 271 |
#, no-wrap |
| 272 |
msgid "reallocarray()" |
| 273 |
msgstr "reallocarray()" |
| 274 |
|
| 275 |
#. type: Plain text |
| 276 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 277 |
#: opensuse-tumbleweed |
| 278 |
msgid "" |
| 279 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 280 |
"the memory block pointed to by I<p> to be large enough for an array of I<n> " |
| 281 |
"elements, each of which is I<size> bytes. It is equivalent to the call" |
| 282 |
msgstr "" |
| 283 |
|
| 284 |
#. type: Plain text |
| 285 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 286 |
#: opensuse-tumbleweed |
| 287 |
#, fuzzy, no-wrap |
| 288 |
#| msgid "realloc(ptr, nmemb * size);\n" |
| 289 |
msgid "realloc(p, n * size);\n" |
| 290 |
msgstr "realloc(ptr, nmemb * size);\n" |
| 291 |
|
| 292 |
#. type: Plain text |
| 293 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 294 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 295 |
msgid "" |
| 296 |
"However, unlike that B<realloc>() call, B<reallocarray>() fails safely in " |
| 297 |
"the case where the multiplication would overflow. If such an overflow " |
| 298 |
"occurs, B<reallocarray>() returns an error." |
| 299 |
msgstr "" |
| 300 |
|
| 301 |
#. type: SH |
| 302 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 303 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 304 |
#, no-wrap |
| 305 |
msgid "RETURN VALUE" |
| 306 |
msgstr "반환값" |
| 307 |
|
| 308 |
#. type: Plain text |
| 309 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 310 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 311 |
msgid "" |
| 312 |
"The B<malloc>(), B<calloc>(), B<realloc>(), and B<reallocarray>() functions " |
| 313 |
"return a pointer to the allocated memory, which is suitably aligned for any " |
| 314 |
"type that fits into the requested size or less. On error, these functions " |
| 315 |
"return NULL and set I<errno>. Attempting to allocate more than " |
| 316 |
"B<PTRDIFF_MAX> bytes is considered an error, as an object that large could " |
| 317 |
"cause later pointer subtraction to overflow." |
| 318 |
msgstr "" |
| 319 |
|
| 320 |
#. type: Plain text |
| 321 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 322 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 323 |
msgid "The B<free>() function returns no value, and preserves I<errno>." |
| 324 |
msgstr "" |
| 325 |
|
| 326 |
#. type: Plain text |
| 327 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 328 |
#: opensuse-tumbleweed |
| 329 |
msgid "" |
| 330 |
"The B<realloc>() and B<reallocarray>() functions return NULL if I<p> is " |
| 331 |
"not NULL and the requested size is zero; this is not considered an error. " |
| 332 |
"(See \"Nonportable behavior\" for portability issues.) Otherwise, the " |
| 333 |
"returned pointer may be the same as I<p> if the allocation was not moved " |
| 334 |
"(e.g., there was room to expand the allocation in-place), or different from " |
| 335 |
"I<p> if the allocation was moved to a new address. If these functions fail, " |
| 336 |
"the original block is left untouched; it is not freed or moved." |
| 337 |
msgstr "" |
| 338 |
|
| 339 |
#. type: SH |
| 340 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 341 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 342 |
#, no-wrap |
| 343 |
msgid "ERRORS" |
| 344 |
msgstr "에러" |
| 345 |
|
| 346 |
#. type: Plain text |
| 347 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 348 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 349 |
msgid "" |
| 350 |
"B<calloc>(), B<malloc>(), B<realloc>(), and B<reallocarray>() can fail with " |
| 351 |
"the following error:" |
| 352 |
msgstr "" |
| 353 |
|
| 354 |
#. type: TP |
| 355 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 356 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 357 |
#, no-wrap |
| 358 |
msgid "B<ENOMEM>" |
| 359 |
msgstr "B<ENOMEM>" |
| 360 |
|
| 361 |
#. type: Plain text |
| 362 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 363 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 364 |
msgid "" |
| 365 |
"Out of memory. Possibly, the application hit the B<RLIMIT_AS> or " |
| 366 |
"B<RLIMIT_DATA> limit described in B<getrlimit>(2). Another reason could be " |
| 367 |
"that the number of mappings created by the caller process exceeded the limit " |
| 368 |
"specified by I</proc/sys/vm/max_map_count>." |
| 369 |
msgstr "" |
| 370 |
|
| 371 |
#. type: SH |
| 372 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 373 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 374 |
#, no-wrap |
| 375 |
msgid "ATTRIBUTES" |
| 376 |
msgstr "속성" |
| 377 |
|
| 378 |
#. type: Plain text |
| 379 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 380 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 381 |
msgid "" |
| 382 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 383 |
msgstr "" |
| 384 |
"이 섹션에서 사용되는 용어에 대한 설명은 B<attributes>(7)을 참조하십시오." |
| 385 |
|
| 386 |
#. type: tbl table |
| 387 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 388 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 389 |
#, no-wrap |
| 390 |
msgid "Interface" |
| 391 |
msgstr "상호 작용" |
| 392 |
|
| 393 |
#. type: tbl table |
| 394 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 395 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 396 |
#, no-wrap |
| 397 |
msgid "Attribute" |
| 398 |
msgstr "속성" |
| 399 |
|
| 400 |
#. type: tbl table |
| 401 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 402 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 403 |
#, no-wrap |
| 404 |
msgid "Value" |
| 405 |
msgstr "번호" |
| 406 |
|
| 407 |
#. type: tbl table |
| 408 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 409 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 410 |
#, no-wrap |
| 411 |
msgid ".na\n" |
| 412 |
msgstr ".na\n" |
| 413 |
|
| 414 |
#. type: tbl table |
| 415 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 416 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 417 |
#, no-wrap |
| 418 |
msgid ".nh\n" |
| 419 |
msgstr ".nh\n" |
| 420 |
|
| 421 |
#. type: tbl table |
| 422 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 423 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 424 |
#, no-wrap |
| 425 |
msgid "" |
| 426 |
"B<malloc>(),\n" |
| 427 |
"B<free>(),\n" |
| 428 |
"B<calloc>(),\n" |
| 429 |
"B<realloc>()" |
| 430 |
msgstr "" |
| 431 |
"B<malloc>(),\n" |
| 432 |
"B<free>(),\n" |
| 433 |
"B<calloc>(),\n" |
| 434 |
"B<realloc>()" |
| 435 |
|
| 436 |
#. type: tbl table |
| 437 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 438 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 439 |
#, no-wrap |
| 440 |
msgid "Thread safety" |
| 441 |
msgstr "" |
| 442 |
|
| 443 |
#. type: tbl table |
| 444 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 445 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 446 |
#, no-wrap |
| 447 |
msgid "MT-Safe" |
| 448 |
msgstr "MT-Safe" |
| 449 |
|
| 450 |
#. type: SH |
| 451 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 452 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 453 |
#, no-wrap |
| 454 |
msgid "STANDARDS" |
| 455 |
msgstr "표준" |
| 456 |
|
| 457 |
#. type: TP |
| 458 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 459 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 460 |
#, fuzzy, no-wrap |
| 461 |
#| msgid "malloc()" |
| 462 |
msgid "B<malloc>()" |
| 463 |
msgstr "malloc()" |
| 464 |
|
| 465 |
#. type: TQ |
| 466 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 467 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 468 |
#, fuzzy, no-wrap |
| 469 |
#| msgid "free()" |
| 470 |
msgid "B<free>()" |
| 471 |
msgstr "free()" |
| 472 |
|
| 473 |
#. type: TQ |
| 474 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 475 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 476 |
#, fuzzy, no-wrap |
| 477 |
#| msgid "calloc()" |
| 478 |
msgid "B<calloc>()" |
| 479 |
msgstr "calloc()" |
| 480 |
|
| 481 |
#. type: TQ |
| 482 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 483 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 484 |
#, fuzzy, no-wrap |
| 485 |
#| msgid "realloc()" |
| 486 |
msgid "B<realloc>()" |
| 487 |
msgstr "realloc()" |
| 488 |
|
| 489 |
#. type: Plain text |
| 490 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 491 |
#: opensuse-tumbleweed |
| 492 |
msgid "C23, POSIX.1-2024." |
| 493 |
msgstr "C23, POSIX.1-2024." |
| 494 |
|
| 495 |
#. type: TP |
| 496 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 497 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 498 |
#, fuzzy, no-wrap |
| 499 |
#| msgid "B<reallocarray>():" |
| 500 |
msgid "B<reallocarray>()" |
| 501 |
msgstr "B<reallocarray>():" |
| 502 |
|
| 503 |
#. type: Plain text |
| 504 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 505 |
#: opensuse-tumbleweed |
| 506 |
msgid "POSIX.1-2024." |
| 507 |
msgstr "POSIX.1-2024." |
| 508 |
|
| 509 |
#. type: SS |
| 510 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 511 |
#: opensuse-tumbleweed |
| 512 |
#, fuzzy, no-wrap |
| 513 |
#| msgid "realloc()" |
| 514 |
msgid "realloc(p, 0)" |
| 515 |
msgstr "realloc()" |
| 516 |
|
| 517 |
#. type: Plain text |
| 518 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 519 |
#: opensuse-tumbleweed |
| 520 |
msgid "" |
| 521 |
"The behavior of I<realloc(p,\\ 0)> in glibc doesn't conform to any of C99, " |
| 522 |
"C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, POSIX.1-2017, " |
| 523 |
"or POSIX.1-2024. The C17 specification was changed to make it conforming, " |
| 524 |
"but that specification made it impossible to write code that reliably " |
| 525 |
"determines if the input pointer is freed after I<realloc(p,\\ 0)>, and C23 " |
| 526 |
"changed it again to make this undefined behavior, acknowledging that the C17 " |
| 527 |
"specification was broad enough, so that undefined behavior wasn't worse than " |
| 528 |
"that." |
| 529 |
msgstr "" |
| 530 |
|
| 531 |
#. type: Plain text |
| 532 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 533 |
#: opensuse-tumbleweed |
| 534 |
msgid "B<reallocarray>() suffers the same issues in glibc." |
| 535 |
msgstr "" |
| 536 |
|
| 537 |
#. type: Plain text |
| 538 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 539 |
#: opensuse-tumbleweed |
| 540 |
msgid "musl libc and the BSDs conform to all versions of ISO C and POSIX.1." |
| 541 |
msgstr "" |
| 542 |
|
| 543 |
#. type: Plain text |
| 544 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 545 |
#: opensuse-tumbleweed |
| 546 |
msgid "" |
| 547 |
"gnulib provides the I<realloc-posix> module, which provides wrappers " |
| 548 |
"B<realloc>() and B<reallocarray>() that conform to all versions of ISO C " |
| 549 |
"and POSIX.1." |
| 550 |
msgstr "" |
| 551 |
|
| 552 |
#. type: Plain text |
| 553 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 554 |
#: opensuse-tumbleweed |
| 555 |
msgid "" |
| 556 |
"There's a proposal to standardize the BSD behavior: E<.UR https:\\://" |
| 557 |
"www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> " |
| 558 |
"E<.UE .>" |
| 559 |
msgstr "" |
| 560 |
|
| 561 |
#. type: SH |
| 562 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 563 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 564 |
#, no-wrap |
| 565 |
msgid "HISTORY" |
| 566 |
msgstr "이력" |
| 567 |
|
| 568 |
#. type: Plain text |
| 569 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 570 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 571 |
msgid "POSIX.1-2001, C89." |
| 572 |
msgstr "POSIX.1-2001, C89." |
| 573 |
|
| 574 |
#. type: Plain text |
| 575 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 576 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 577 |
msgid "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." |
| 578 |
msgstr "" |
| 579 |
|
| 580 |
#. type: Plain text |
| 581 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 582 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 583 |
msgid "" |
| 584 |
"B<malloc>() and related functions rejected sizes greater than " |
| 585 |
"B<PTRDIFF_MAX> starting in glibc 2.30." |
| 586 |
msgstr "" |
| 587 |
|
| 588 |
#. type: Plain text |
| 589 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 590 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 591 |
msgid "B<free>() preserved I<errno> starting in glibc 2.33." |
| 592 |
msgstr "" |
| 593 |
|
| 594 |
#. type: SS |
| 595 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 596 |
#: opensuse-tumbleweed |
| 597 |
#, fuzzy, no-wrap |
| 598 |
#| msgid "realloc()" |
| 599 |
msgid "realloc(p,\\ 0)" |
| 600 |
msgstr "realloc()" |
| 601 |
|
| 602 |
#. type: Plain text |
| 603 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 604 |
#: opensuse-tumbleweed |
| 605 |
msgid "" |
| 606 |
"C89 was ambiguous in its specification of I<realloc(p,\\ 0)>. C99 partially " |
| 607 |
"fixed this." |
| 608 |
msgstr "" |
| 609 |
|
| 610 |
#. type: Plain text |
| 611 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 612 |
#: opensuse-tumbleweed |
| 613 |
msgid "" |
| 614 |
"The original implementation in glibc would have been conforming to C99. " |
| 615 |
"However, and ironically, trying to comply with C99 before the standard was " |
| 616 |
"released, glibc changed its behavior in glibc 2.1.1 into something that " |
| 617 |
"ended up not conforming to the final C99 specification (but this is debated, " |
| 618 |
"as the wording of the standard seems self-contradicting)." |
| 619 |
msgstr "" |
| 620 |
|
| 621 |
#. type: SH |
| 622 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 623 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 624 |
#, no-wrap |
| 625 |
msgid "NOTES" |
| 626 |
msgstr "주의" |
| 627 |
|
| 628 |
#. type: Plain text |
| 629 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 630 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 631 |
msgid "" |
| 632 |
"By default, Linux follows an optimistic memory allocation strategy. This " |
| 633 |
"means that when B<malloc>() returns non-NULL there is no guarantee that the " |
| 634 |
"memory really is available. In case it turns out that the system is out of " |
| 635 |
"memory, one or more processes will be killed by the OOM killer. For more " |
| 636 |
"information, see the description of I</proc/sys/vm/overcommit_memory> and I</" |
| 637 |
"proc/sys/vm/oom_adj> in B<proc>(5), and the Linux kernel source file " |
| 638 |
"I<Documentation/vm/overcommit-accounting.rst>." |
| 639 |
msgstr "" |
| 640 |
|
| 641 |
#. type: Plain text |
| 642 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 643 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 644 |
msgid "" |
| 645 |
"Normally, B<malloc>() allocates memory from the heap, and adjusts the size " |
| 646 |
"of the heap as required, using B<sbrk>(2). When allocating blocks of memory " |
| 647 |
"larger than B<MMAP_THRESHOLD> bytes, the glibc B<malloc>() implementation " |
| 648 |
"allocates the memory as a private anonymous mapping using B<mmap>(2). " |
| 649 |
"B<MMAP_THRESHOLD> is 128\\ kB by default, but is adjustable using " |
| 650 |
"B<mallopt>(3). Prior to Linux 4.7 allocations performed using B<mmap>(2) " |
| 651 |
"were unaffected by the B<RLIMIT_DATA> resource limit; since Linux 4.7, this " |
| 652 |
"limit is also enforced for allocations performed using B<mmap>(2)." |
| 653 |
msgstr "" |
| 654 |
|
| 655 |
#. type: Plain text |
| 656 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 657 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 658 |
msgid "" |
| 659 |
"To avoid corruption in multithreaded applications, mutexes are used " |
| 660 |
"internally to protect the memory-management data structures employed by " |
| 661 |
"these functions. In a multithreaded application in which threads " |
| 662 |
"simultaneously allocate and free memory, there could be contention for these " |
| 663 |
"mutexes. To scalably handle memory allocation in multithreaded " |
| 664 |
"applications, glibc creates additional I<memory allocation arenas> if mutex " |
| 665 |
"contention is detected. Each arena is a large region of memory that is " |
| 666 |
"internally allocated by the system (using B<brk>(2) or B<mmap>(2)), and " |
| 667 |
"managed with its own mutexes." |
| 668 |
msgstr "" |
| 669 |
|
| 670 |
#. type: Plain text |
| 671 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 672 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 673 |
msgid "" |
| 674 |
"If your program uses a private memory allocator, it should do so by " |
| 675 |
"replacing B<malloc>(), B<free>(), B<calloc>(), and B<realloc>(). The " |
| 676 |
"replacement functions must implement the documented glibc behaviors, " |
| 677 |
"including I<errno> handling, size-zero allocations, and overflow checking; " |
| 678 |
"otherwise, other library routines may crash or operate incorrectly. For " |
| 679 |
"example, if the replacement I<free>() does not preserve I<errno>, then " |
| 680 |
"seemingly unrelated library routines may fail without having a valid reason " |
| 681 |
"in I<errno>. Private memory allocators may also need to replace other glibc " |
| 682 |
"functions; see \"Replacing malloc\" in the glibc manual for details." |
| 683 |
msgstr "" |
| 684 |
|
| 685 |
#. type: Plain text |
| 686 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 687 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 688 |
#, fuzzy |
| 689 |
#| msgid "" |
| 690 |
#| "Crashes in B<malloc()>, B<free()> or B<realloc()> are almost always " |
| 691 |
#| "related to heap corruption, such as overflowing an allocated chunk or " |
| 692 |
#| "freeing the same pointer twice." |
| 693 |
msgid "" |
| 694 |
"Crashes in memory allocators are almost always related to heap corruption, " |
| 695 |
"such as overflowing an allocated chunk or freeing the same pointer twice." |
| 696 |
msgstr "" |
| 697 |
"B<malloc()>, B<free()> 또는 B<realloc()> 함수에서 크래쉬는 할당된 영역의 오" |
| 698 |
"버 플로우나 같은 포인터를 두번 해제 하는 것과 같은 힙 오염과 항상 관련이 있" |
| 699 |
"다." |
| 700 |
|
| 701 |
#. type: Plain text |
| 702 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 703 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 704 |
msgid "" |
| 705 |
"The B<malloc>() implementation is tunable via environment variables; see " |
| 706 |
"B<mallopt>(3) for details." |
| 707 |
msgstr "" |
| 708 |
|
| 709 |
#. type: SS |
| 710 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 711 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 712 |
#, no-wrap |
| 713 |
msgid "Nonportable behavior" |
| 714 |
msgstr "" |
| 715 |
|
| 716 |
#. type: Plain text |
| 717 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 718 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 719 |
msgid "" |
| 720 |
"The behavior of these functions when the requested size is zero is glibc " |
| 721 |
"specific; other implementations may return NULL without setting I<errno>, " |
| 722 |
"and portable POSIX programs should tolerate such behavior. See " |
| 723 |
"B<realloc>(3p)." |
| 724 |
msgstr "" |
| 725 |
|
| 726 |
#. type: Plain text |
| 727 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 728 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 729 |
msgid "" |
| 730 |
"POSIX requires memory allocators to set I<errno> upon failure. However, the " |
| 731 |
"C standard does not require this, and applications portable to non-POSIX " |
| 732 |
"platforms should not assume this." |
| 733 |
msgstr "" |
| 734 |
|
| 735 |
#. type: Plain text |
| 736 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 737 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 738 |
msgid "" |
| 739 |
"Portable programs should not use private memory allocators, as POSIX and the " |
| 740 |
"C standard do not allow replacement of B<malloc>(), B<free>(), B<calloc>(), " |
| 741 |
"and B<realloc>()." |
| 742 |
msgstr "" |
| 743 |
|
| 744 |
#. type: SH |
| 745 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 746 |
#: opensuse-tumbleweed |
| 747 |
#, no-wrap |
| 748 |
msgid "BUGS" |
| 749 |
msgstr "버그" |
| 750 |
|
| 751 |
#. type: Plain text |
| 752 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 753 |
#: opensuse-tumbleweed |
| 754 |
msgid "" |
| 755 |
"Programmers would naturally expect by induction that I<\\%realloc(p,\\ " |
| 756 |
"size)> is consistent with I<free(p)> and I<malloc(size)>, as that is the " |
| 757 |
"behavior in the general case. This is not explicitly required by " |
| 758 |
"POSIX.1-2024 or C11, but all conforming implementations are consistent with " |
| 759 |
"that." |
| 760 |
msgstr "" |
| 761 |
|
| 762 |
#. type: Plain text |
| 763 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 764 |
#: opensuse-tumbleweed |
| 765 |
msgid "" |
| 766 |
"The glibc implementation of B<realloc>() is not consistent with that, and " |
| 767 |
"as a consequence, it is dangerous to call I<\\%realloc(p,\\ 0)> in glibc." |
| 768 |
msgstr "" |
| 769 |
|
| 770 |
#. type: Plain text |
| 771 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 772 |
#: opensuse-tumbleweed |
| 773 |
msgid "" |
| 774 |
"A trivial workaround for glibc is calling it as I<\\%realloc(p,\\ size?" |
| 775 |
"size:1)>." |
| 776 |
msgstr "" |
| 777 |
|
| 778 |
#. type: Plain text |
| 779 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 780 |
#: opensuse-tumbleweed |
| 781 |
msgid "" |
| 782 |
"The workaround for B<reallocarray>() in glibc \\[em]which shares the same " |
| 783 |
"bug\\[em] would be I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>." |
| 784 |
msgstr "" |
| 785 |
|
| 786 |
#. type: SH |
| 787 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 788 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 789 |
#, no-wrap |
| 790 |
msgid "EXAMPLES" |
| 791 |
msgstr "폐제" |
| 792 |
|
| 793 |
#. type: Plain text |
| 794 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 795 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 796 |
#, no-wrap |
| 797 |
msgid "" |
| 798 |
"#include E<lt>err.hE<gt>\n" |
| 799 |
"#include E<lt>stddef.hE<gt>\n" |
| 800 |
"#include E<lt>stdio.hE<gt>\n" |
| 801 |
"#include E<lt>stdlib.hE<gt>\n" |
| 802 |
"#include E<lt>string.hE<gt>\n" |
| 803 |
"\\&\n" |
| 804 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 805 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 806 |
"\\&\n" |
| 807 |
"static inline void *my_mallocarray(size_t n, size_t size);\n" |
| 808 |
"\\&\n" |
| 809 |
"int\n" |
| 810 |
"main(void)\n" |
| 811 |
"{\n" |
| 812 |
" char *p;\n" |
| 813 |
"\\&\n" |
| 814 |
" p = MALLOCARRAY(32, char);\n" |
| 815 |
" if (p == NULL)\n" |
| 816 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 817 |
"\\&\n" |
| 818 |
" strlcpy(p, \"foo\", 32);\n" |
| 819 |
" puts(p);\n" |
| 820 |
"}\n" |
| 821 |
"\\&\n" |
| 822 |
"static inline void *\n" |
| 823 |
"my_mallocarray(size_t n, size_t size)\n" |
| 824 |
"{\n" |
| 825 |
" return reallocarray(NULL, n, size);\n" |
| 826 |
"}\n" |
| 827 |
msgstr "" |
| 828 |
|
| 829 |
#. type: SH |
| 830 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 831 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 832 |
#, no-wrap |
| 833 |
msgid "SEE ALSO" |
| 834 |
msgstr "추가 참조" |
| 835 |
|
| 836 |
#. type: Plain text |
| 837 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 838 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 839 |
msgid "" |
| 840 |
"B<valgrind>(1), B<brk>(2), B<mmap>(2), B<alloca>(3), B<malloc_get_state>(3), " |
| 841 |
"B<malloc_info>(3), B<malloc_trim>(3), B<malloc_usable_size>(3), " |
| 842 |
"B<mallopt>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)" |
| 843 |
msgstr "" |
| 844 |
"B<valgrind>(1), B<brk>(2), B<mmap>(2), B<alloca>(3), B<malloc_get_state>(3), " |
| 845 |
"B<malloc_info>(3), B<malloc_trim>(3), B<malloc_usable_size>(3), " |
| 846 |
"B<mallopt>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)" |
| 847 |
|
| 848 |
#. type: Plain text |
| 849 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 850 |
#: opensuse-tumbleweed |
| 851 |
msgid "" |
| 852 |
"For details of the GNU C library implementation, see E<.UR https:\\://" |
| 853 |
"sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 854 |
msgstr "" |
| 855 |
|
| 856 |
#. type: TH |
| 857 |
#: debian-trixie |
| 858 |
#, no-wrap |
| 859 |
msgid "2024-05-02" |
| 860 |
msgstr "2024년 5월 2일" |
| 861 |
|
| 862 |
#. type: TH |
| 863 |
#: debian-trixie |
| 864 |
#, no-wrap |
| 865 |
msgid "Linux man-pages 6.9.1" |
| 866 |
msgstr "Linux man-pages 6.9.1" |
| 867 |
|
| 868 |
#. type: Plain text |
| 869 |
#: debian-trixie |
| 870 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 871 |
msgstr "표준 C 라이브러리 (I<libc>, I<-lc>)" |
| 872 |
|
| 873 |
#. type: Plain text |
| 874 |
#: debian-trixie |
| 875 |
#, fuzzy, no-wrap |
| 876 |
#| msgid "" |
| 877 |
#| "B<void *malloc(size_t >I<size>B<);>\n" |
| 878 |
#| "B<void free(void >I<*ptr>B<);>\n" |
| 879 |
#| "B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 880 |
#| "B<void *realloc(void >I<*ptr>B<, size_t >I<size>B<);>\n" |
| 881 |
#| "B<void *reallocarray(void >I<*ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 882 |
msgid "" |
| 883 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 884 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 885 |
"B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 886 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n" |
| 887 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 888 |
msgstr "" |
| 889 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 890 |
"B<void free(void >I<*ptr>B<);>\n" |
| 891 |
"B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 892 |
"B<void *realloc(void >I<*ptr>B<, size_t >I<size>B<);>\n" |
| 893 |
"B<void *reallocarray(void >I<*ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 894 |
|
| 895 |
#. type: Plain text |
| 896 |
#: debian-trixie fedora-44 fedora-rawhide |
| 897 |
#, fuzzy |
| 898 |
#| msgid "" |
| 899 |
#| "B<free()> frees the memory space pointed to by I<ptr>, which must have " |
| 900 |
#| "been returned by a previous call to B<malloc()>, B<calloc()> or " |
| 901 |
#| "B<realloc()>. Otherwise, or if B<free(>I<ptr>B<)> has already been " |
| 902 |
#| "called before, undefined behaviour occurs. If I<ptr> is B<NULL>, no " |
| 903 |
#| "operation is performed." |
| 904 |
msgid "" |
| 905 |
"The B<free>() function frees the memory space pointed to by I<ptr>, which " |
| 906 |
"must have been returned by a previous call to B<malloc>() or related " |
| 907 |
"functions. Otherwise, or if I<ptr> has already been freed, undefined " |
| 908 |
"behavior occurs. If I<ptr> is NULL, no operation is performed." |
| 909 |
msgstr "" |
| 910 |
"B<free()> 는 B<malloc()>, B<calloc()> 또는 B<realloc()> 에 대한 호출시 반환되" |
| 911 |
"는 I<ptr> 이 가리키는 메모리 공간을 해제한다. 그렇지 않고, 만일 " |
| 912 |
"B<free(>I<ptr>B<)> 가 전에 이미 호출되었다면, 정의되지 않은 행동이 일어난" |
| 913 |
"다. 만일 I<ptr> 이 B<NULL> 이라면, 어떤 작동도 행해지지 않는다." |
| 914 |
|
| 915 |
#. type: Plain text |
| 916 |
#: debian-trixie |
| 917 |
#, fuzzy |
| 918 |
#| msgid "" |
| 919 |
#| "B<calloc()> allocates memory for an array of I<nmemb> elements of I<size> " |
| 920 |
#| "bytes each and returns a pointer to the allocated memory. The memory is " |
| 921 |
#| "set to zero." |
| 922 |
msgid "" |
| 923 |
"The B<calloc>() function allocates memory for an array of I<nmemb> elements " |
| 924 |
"of I<size> bytes each and returns a pointer to the allocated memory. The " |
| 925 |
"memory is set to zero. If I<nmemb> or I<size> is 0, then B<calloc>() " |
| 926 |
"returns a unique pointer value that can later be successfully passed to " |
| 927 |
"B<free>()." |
| 928 |
msgstr "" |
| 929 |
"B<calloc()> 함수는 원소의 크기가 I<size> 바이트인 I<nmemb> 개의 원소로 이루어" |
| 930 |
"진 배열을 위한 메모리를 할당하고 할당된 메모리에 대한 포인터를 반환한다. 메" |
| 931 |
"모리는 0 으로 설정된다." |
| 932 |
|
| 933 |
#. type: Plain text |
| 934 |
#: debian-trixie |
| 935 |
msgid "" |
| 936 |
"If the multiplication of I<nmemb> and I<size> would result in integer " |
| 937 |
"overflow, then B<calloc>() returns an error. By contrast, an integer " |
| 938 |
"overflow would not be detected in the following call to B<malloc>(), with " |
| 939 |
"the result that an incorrectly sized block of memory would be allocated:" |
| 940 |
msgstr "" |
| 941 |
|
| 942 |
#. type: Plain text |
| 943 |
#: debian-trixie |
| 944 |
#, no-wrap |
| 945 |
msgid "malloc(nmemb * size);\n" |
| 946 |
msgstr "malloc(nmemb * size);\n" |
| 947 |
|
| 948 |
#. type: Plain text |
| 949 |
#: debian-trixie fedora-44 fedora-rawhide |
| 950 |
msgid "" |
| 951 |
"The B<realloc>() function changes the size of the memory block pointed to " |
| 952 |
"by I<ptr> to I<size> bytes. The contents of the memory will be unchanged in " |
| 953 |
"the range from the start of the region up to the minimum of the old and new " |
| 954 |
"sizes. If the new size is larger than the old size, the added memory will " |
| 955 |
"I<not> be initialized." |
| 956 |
msgstr "" |
| 957 |
|
| 958 |
#. type: Plain text |
| 959 |
#: debian-trixie fedora-44 fedora-rawhide |
| 960 |
msgid "" |
| 961 |
"If I<ptr> is NULL, then the call is equivalent to I<malloc(size)>, for all " |
| 962 |
"values of I<size>." |
| 963 |
msgstr "" |
| 964 |
|
| 965 |
#. type: Plain text |
| 966 |
#: debian-trixie fedora-44 fedora-rawhide |
| 967 |
msgid "" |
| 968 |
"If I<size> is equal to zero, and I<ptr> is not NULL, then the call is " |
| 969 |
"equivalent to I<free(ptr)> (but see \"Nonportable behavior\" for portability " |
| 970 |
"issues)." |
| 971 |
msgstr "" |
| 972 |
|
| 973 |
#. type: Plain text |
| 974 |
#: debian-trixie fedora-44 fedora-rawhide |
| 975 |
msgid "" |
| 976 |
"Unless I<ptr> is NULL, it must have been returned by an earlier call to " |
| 977 |
"B<malloc> or related functions. If the area pointed to was moved, a " |
| 978 |
"I<free(ptr)> is done." |
| 979 |
msgstr "" |
| 980 |
|
| 981 |
#. type: Plain text |
| 982 |
#: debian-trixie |
| 983 |
msgid "" |
| 984 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 985 |
"the memory block pointed to by I<ptr> to be large enough for an array of " |
| 986 |
"I<nmemb> elements, each of which is I<size> bytes. It is equivalent to the " |
| 987 |
"call" |
| 988 |
msgstr "" |
| 989 |
|
| 990 |
#. type: Plain text |
| 991 |
#: debian-trixie |
| 992 |
#, no-wrap |
| 993 |
msgid "realloc(ptr, nmemb * size);\n" |
| 994 |
msgstr "realloc(ptr, nmemb * size);\n" |
| 995 |
|
| 996 |
#. type: Plain text |
| 997 |
#: debian-trixie fedora-44 fedora-rawhide |
| 998 |
msgid "" |
| 999 |
"The B<realloc>() and B<reallocarray>() functions return NULL if I<ptr> is " |
| 1000 |
"not NULL and the requested size is zero; this is not considered an error. " |
| 1001 |
"(See \"Nonportable behavior\" for portability issues.) Otherwise, the " |
| 1002 |
"returned pointer may be the same as I<ptr> if the allocation was not moved " |
| 1003 |
"(e.g., there was room to expand the allocation in-place), or different from " |
| 1004 |
"I<ptr> if the allocation was moved to a new address. If these functions " |
| 1005 |
"fail, the original block is left untouched; it is not freed or moved." |
| 1006 |
msgstr "" |
| 1007 |
|
| 1008 |
#. type: Plain text |
| 1009 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1010 |
msgid "C11, POSIX.1-2008." |
| 1011 |
msgstr "C11, POSIX.1-2008." |
| 1012 |
|
| 1013 |
#. type: Plain text |
| 1014 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1015 |
msgid "None." |
| 1016 |
msgstr "" |
| 1017 |
|
| 1018 |
#. type: Plain text |
| 1019 |
#: debian-trixie |
| 1020 |
#, no-wrap |
| 1021 |
msgid "" |
| 1022 |
"#include E<lt>err.hE<gt>\n" |
| 1023 |
"#include E<lt>stddef.hE<gt>\n" |
| 1024 |
"#include E<lt>stdio.hE<gt>\n" |
| 1025 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1026 |
"#include E<lt>string.hE<gt>\n" |
| 1027 |
"\\&\n" |
| 1028 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 1029 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 1030 |
"\\&\n" |
| 1031 |
"static inline void *my_mallocarray(size_t nmemb, size_t size);\n" |
| 1032 |
"\\&\n" |
| 1033 |
"int\n" |
| 1034 |
"main(void)\n" |
| 1035 |
"{\n" |
| 1036 |
" char *p;\n" |
| 1037 |
"\\&\n" |
| 1038 |
" p = MALLOCARRAY(32, char);\n" |
| 1039 |
" if (p == NULL)\n" |
| 1040 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 1041 |
"\\&\n" |
| 1042 |
" strlcpy(p, \"foo\", 32);\n" |
| 1043 |
" puts(p);\n" |
| 1044 |
"}\n" |
| 1045 |
"\\&\n" |
| 1046 |
"static inline void *\n" |
| 1047 |
"my_mallocarray(size_t nmemb, size_t size)\n" |
| 1048 |
"{\n" |
| 1049 |
" return reallocarray(NULL, nmemb, size);\n" |
| 1050 |
"}\n" |
| 1051 |
msgstr "" |
| 1052 |
|
| 1053 |
#. type: Plain text |
| 1054 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1055 |
msgid "" |
| 1056 |
"For details of the GNU C library implementation, see E<.UR https://" |
| 1057 |
"sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 1058 |
msgstr "" |
| 1059 |
|
| 1060 |
#. type: TH |
| 1061 |
#: fedora-44 fedora-rawhide |
| 1062 |
#, no-wrap |
| 1063 |
msgid "2024-11-17" |
| 1064 |
msgstr "2024년 11월 17일" |
| 1065 |
|
| 1066 |
#. type: TH |
| 1067 |
#: fedora-44 fedora-rawhide |
| 1068 |
#, no-wrap |
| 1069 |
msgid "Linux man-pages 6.13" |
| 1070 |
msgstr "Linux man-pages 6.13" |
| 1071 |
|
| 1072 |
#. type: Plain text |
| 1073 |
#: fedora-44 fedora-rawhide |
| 1074 |
#, fuzzy, no-wrap |
| 1075 |
#| msgid "" |
| 1076 |
#| "B<void *malloc(size_t >I<size>B<);>\n" |
| 1077 |
#| "B<void free(void >I<*ptr>B<);>\n" |
| 1078 |
#| "B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 1079 |
#| "B<void *realloc(void >I<*ptr>B<, size_t >I<size>B<);>\n" |
| 1080 |
#| "B<void *reallocarray(void >I<*ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 1081 |
msgid "" |
| 1082 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 1083 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1084 |
"B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 1085 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n" |
| 1086 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 1087 |
msgstr "" |
| 1088 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 1089 |
"B<void free(void >I<*ptr>B<);>\n" |
| 1090 |
"B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 1091 |
"B<void *realloc(void >I<*ptr>B<, size_t >I<size>B<);>\n" |
| 1092 |
"B<void *reallocarray(void >I<*ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 1093 |
|
| 1094 |
#. type: Plain text |
| 1095 |
#: fedora-44 fedora-rawhide |
| 1096 |
msgid "" |
| 1097 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 1098 |
"the memory block pointed to by I<ptr> to be large enough for an array of " |
| 1099 |
"I<n> elements, each of which is I<size> bytes. It is equivalent to the call" |
| 1100 |
msgstr "" |
| 1101 |
|
| 1102 |
#. type: Plain text |
| 1103 |
#: fedora-44 fedora-rawhide |
| 1104 |
#, fuzzy, no-wrap |
| 1105 |
#| msgid "realloc(ptr, nmemb * size);\n" |
| 1106 |
msgid "realloc(ptr, n * size);\n" |
| 1107 |
msgstr "realloc(ptr, nmemb * size);\n" |
| 1108 |
|
| 1109 |
#. type: TH |
| 1110 |
#: mageia-cauldron |
| 1111 |
#, no-wrap |
| 1112 |
msgid "Linux man-pages 6.17" |
| 1113 |
msgstr "Linux man-pages 6.17" |
| 1114 |
|
| 1115 |
#. type: TH |
| 1116 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1117 |
#, no-wrap |
| 1118 |
msgid "Linux man-pages (unreleased)" |
| 1119 |
msgstr "Linux man-pages (미공개)" |