| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:30+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\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 "mallinfo" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 28 |
#, no-wrap |
| 29 |
msgid "2026-02-22" |
| 30 |
msgstr "" |
| 31 |
|
| 32 |
#. type: TH |
| 33 |
#: archlinux debian-unstable |
| 34 |
#, no-wrap |
| 35 |
msgid "Linux man-pages 6.18" |
| 36 |
msgstr "" |
| 37 |
|
| 38 |
#. type: SH |
| 39 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 40 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 41 |
#, no-wrap |
| 42 |
msgid "NAME" |
| 43 |
msgstr "" |
| 44 |
|
| 45 |
#. type: Plain text |
| 46 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 47 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 48 |
msgid "mallinfo, mallinfo2 - obtain memory allocation information" |
| 49 |
msgstr "" |
| 50 |
|
| 51 |
#. type: SH |
| 52 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 53 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 54 |
#, no-wrap |
| 55 |
msgid "LIBRARY" |
| 56 |
msgstr "" |
| 57 |
|
| 58 |
#. type: Plain text |
| 59 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 60 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 61 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 62 |
msgstr "" |
| 63 |
|
| 64 |
#. type: SH |
| 65 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 66 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 67 |
#, no-wrap |
| 68 |
msgid "SYNOPSIS" |
| 69 |
msgstr "" |
| 70 |
|
| 71 |
#. type: Plain text |
| 72 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 73 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 74 |
#, no-wrap |
| 75 |
msgid "B<#include E<lt>malloc.hE<gt>>\n" |
| 76 |
msgstr "" |
| 77 |
|
| 78 |
#. type: Plain text |
| 79 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 80 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 81 |
#, no-wrap |
| 82 |
msgid "" |
| 83 |
"B<struct mallinfo mallinfo(void);>\n" |
| 84 |
"B<struct mallinfo2 mallinfo2(void);>\n" |
| 85 |
msgstr "" |
| 86 |
|
| 87 |
#. type: SH |
| 88 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 89 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 90 |
#, no-wrap |
| 91 |
msgid "DESCRIPTION" |
| 92 |
msgstr "" |
| 93 |
|
| 94 |
#. type: Plain text |
| 95 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 96 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 97 |
msgid "" |
| 98 |
"These functions return a copy of a structure containing information about " |
| 99 |
"memory allocations performed by B<malloc>(3) and related functions. The " |
| 100 |
"structure returned by each function contains the same fields. However, the " |
| 101 |
"older function, B<mallinfo>(), is deprecated since the type used for the " |
| 102 |
"fields is too small (see BUGS)." |
| 103 |
msgstr "" |
| 104 |
|
| 105 |
#. type: Plain text |
| 106 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 107 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 108 |
msgid "" |
| 109 |
"Note that not all allocations are visible to these functions; see BUGS and " |
| 110 |
"consider using B<malloc_info>(3) instead." |
| 111 |
msgstr "" |
| 112 |
|
| 113 |
#. type: Plain text |
| 114 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 115 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 116 |
msgid "" |
| 117 |
"The I<mallinfo2> structure returned by B<mallinfo2>() is defined as follows:" |
| 118 |
msgstr "" |
| 119 |
|
| 120 |
#. type: Plain text |
| 121 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 122 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 123 |
#, no-wrap |
| 124 |
msgid "" |
| 125 |
"struct mallinfo2 {\n" |
| 126 |
" size_t arena; /* Non-mmapped space allocated (bytes) */\n" |
| 127 |
" size_t ordblks; /* Number of free chunks */\n" |
| 128 |
" size_t smblks; /* Number of free fastbin blocks */\n" |
| 129 |
" size_t hblks; /* Number of mmapped regions */\n" |
| 130 |
" size_t hblkhd; /* Space allocated in mmapped regions\n" |
| 131 |
" (bytes) */\n" |
| 132 |
" size_t usmblks; /* See below */\n" |
| 133 |
" size_t fsmblks; /* Space in freed fastbin blocks (bytes) */\n" |
| 134 |
" size_t uordblks; /* Total allocated space (bytes) */\n" |
| 135 |
" size_t fordblks; /* Total free space (bytes) */\n" |
| 136 |
" size_t keepcost; /* Top-most, releasable space (bytes) */\n" |
| 137 |
"};\n" |
| 138 |
msgstr "" |
| 139 |
|
| 140 |
#. type: Plain text |
| 141 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 142 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 143 |
msgid "" |
| 144 |
"The I<mallinfo> structure returned by the deprecated B<mallinfo>() function " |
| 145 |
"is exactly the same, except that the fields are typed as I<int>." |
| 146 |
msgstr "" |
| 147 |
|
| 148 |
#. type: Plain text |
| 149 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 150 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 151 |
msgid "The structure fields contain the following information:" |
| 152 |
msgstr "" |
| 153 |
|
| 154 |
#. type: TP |
| 155 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 156 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 157 |
#, no-wrap |
| 158 |
msgid "I<arena>" |
| 159 |
msgstr "" |
| 160 |
|
| 161 |
#. type: Plain text |
| 162 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 163 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 164 |
msgid "" |
| 165 |
"The total amount of memory allocated by means other than B<mmap>(2) (i.e., " |
| 166 |
"memory allocated on the heap). This figure includes both in-use blocks and " |
| 167 |
"blocks on the free list." |
| 168 |
msgstr "" |
| 169 |
|
| 170 |
#. type: TP |
| 171 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 172 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 173 |
#, no-wrap |
| 174 |
msgid "I<ordblks>" |
| 175 |
msgstr "" |
| 176 |
|
| 177 |
#. type: Plain text |
| 178 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 179 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 180 |
msgid "The number of ordinary (i.e., non-fastbin) free blocks." |
| 181 |
msgstr "" |
| 182 |
|
| 183 |
#. type: TP |
| 184 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 185 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 186 |
#, no-wrap |
| 187 |
msgid "I<smblks>" |
| 188 |
msgstr "" |
| 189 |
|
| 190 |
#. the glibc info page wrongly says this field is unused |
| 191 |
#. https://sourceware.org/bugzilla/show_bug.cgi?id=26746 |
| 192 |
#. type: Plain text |
| 193 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 194 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 195 |
msgid "The number of fastbin free blocks (see B<mallopt>(3))." |
| 196 |
msgstr "" |
| 197 |
|
| 198 |
#. type: TP |
| 199 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 200 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 201 |
#, no-wrap |
| 202 |
msgid "I<hblks>" |
| 203 |
msgstr "" |
| 204 |
|
| 205 |
#. type: Plain text |
| 206 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 207 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 208 |
msgid "" |
| 209 |
"The number of blocks currently allocated using B<mmap>(2). (See the " |
| 210 |
"discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)" |
| 211 |
msgstr "" |
| 212 |
|
| 213 |
#. type: TP |
| 214 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 215 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 216 |
#, no-wrap |
| 217 |
msgid "I<hblkhd>" |
| 218 |
msgstr "" |
| 219 |
|
| 220 |
#. type: Plain text |
| 221 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 222 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 223 |
msgid "The number of bytes in blocks currently allocated using B<mmap>(2)." |
| 224 |
msgstr "" |
| 225 |
|
| 226 |
#. type: TP |
| 227 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 228 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 229 |
#, no-wrap |
| 230 |
msgid "I<usmblks>" |
| 231 |
msgstr "" |
| 232 |
|
| 233 |
#. It seems to have been zero since at least as far back as glibc 2.15 |
| 234 |
#. type: Plain text |
| 235 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 236 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 237 |
msgid "" |
| 238 |
"This field is unused, and is always 0. Historically, it was the \"highwater " |
| 239 |
"mark\" for allocated space\\[em]that is, the maximum amount of space that " |
| 240 |
"was ever allocated (in bytes); this field was maintained only in " |
| 241 |
"nonthreading environments." |
| 242 |
msgstr "" |
| 243 |
|
| 244 |
#. type: TP |
| 245 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 246 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 247 |
#, no-wrap |
| 248 |
msgid "I<fsmblks>" |
| 249 |
msgstr "" |
| 250 |
|
| 251 |
#. the glibc info page wrongly says this field is unused |
| 252 |
#. https://sourceware.org/bugzilla/show_bug.cgi?id=26746 |
| 253 |
#. type: Plain text |
| 254 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 255 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 256 |
msgid "The total number of bytes in fastbin free blocks." |
| 257 |
msgstr "" |
| 258 |
|
| 259 |
#. type: TP |
| 260 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 261 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 262 |
#, no-wrap |
| 263 |
msgid "I<uordblks>" |
| 264 |
msgstr "" |
| 265 |
|
| 266 |
#. type: Plain text |
| 267 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 268 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 269 |
msgid "The total number of bytes used by in-use allocations." |
| 270 |
msgstr "" |
| 271 |
|
| 272 |
#. type: TP |
| 273 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 274 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 275 |
#, no-wrap |
| 276 |
msgid "I<fordblks>" |
| 277 |
msgstr "" |
| 278 |
|
| 279 |
#. type: Plain text |
| 280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
msgid "The total number of bytes in free blocks." |
| 283 |
msgstr "" |
| 284 |
|
| 285 |
#. type: TP |
| 286 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 287 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 288 |
#, no-wrap |
| 289 |
msgid "I<keepcost>" |
| 290 |
msgstr "" |
| 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 |
"The total amount of releasable free space at the top of the heap. This is " |
| 297 |
"the maximum number of bytes that could ideally (i.e., ignoring page " |
| 298 |
"alignment restrictions, and so on) be released by B<malloc_trim>(3)." |
| 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 "ATTRIBUTES" |
| 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 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 313 |
msgstr "" |
| 314 |
|
| 315 |
#. type: tbl table |
| 316 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 317 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 318 |
#, no-wrap |
| 319 |
msgid "Interface" |
| 320 |
msgstr "" |
| 321 |
|
| 322 |
#. type: tbl table |
| 323 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 324 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 325 |
#, no-wrap |
| 326 |
msgid "Attribute" |
| 327 |
msgstr "" |
| 328 |
|
| 329 |
#. type: tbl table |
| 330 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 331 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 332 |
#, no-wrap |
| 333 |
msgid "Value" |
| 334 |
msgstr "" |
| 335 |
|
| 336 |
#. type: tbl table |
| 337 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 338 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 339 |
#, no-wrap |
| 340 |
msgid ".na\n" |
| 341 |
msgstr "" |
| 342 |
|
| 343 |
#. type: tbl table |
| 344 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 345 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 346 |
#, no-wrap |
| 347 |
msgid ".nh\n" |
| 348 |
msgstr "" |
| 349 |
|
| 350 |
#. type: tbl table |
| 351 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 352 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 353 |
#, no-wrap |
| 354 |
msgid "" |
| 355 |
"B<mallinfo>(),\n" |
| 356 |
"B<mallinfo2>()" |
| 357 |
msgstr "" |
| 358 |
|
| 359 |
#. type: tbl table |
| 360 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 361 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 362 |
#, no-wrap |
| 363 |
msgid "Thread safety" |
| 364 |
msgstr "" |
| 365 |
|
| 366 |
#. type: tbl table |
| 367 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 368 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 369 |
#, no-wrap |
| 370 |
msgid "MT-Unsafe init const:mallopt" |
| 371 |
msgstr "" |
| 372 |
|
| 373 |
#. type: Plain text |
| 374 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 375 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 376 |
msgid "" |
| 377 |
"B<mallinfo>()/ B<mallinfo2>() would access some global internal objects. " |
| 378 |
"If modify them with non-atomically, may get inconsistent results. The " |
| 379 |
"identifier I<mallopt> in I<const:mallopt> mean that B<mallopt>() would " |
| 380 |
"modify the global internal objects with atomics, that make sure " |
| 381 |
"B<mallinfo>()/ B<mallinfo2>() is safe enough, others modify with non-" |
| 382 |
"atomically maybe not." |
| 383 |
msgstr "" |
| 384 |
|
| 385 |
#. type: SH |
| 386 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 387 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 388 |
#, no-wrap |
| 389 |
msgid "STANDARDS" |
| 390 |
msgstr "" |
| 391 |
|
| 392 |
#. type: Plain text |
| 393 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 394 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 395 |
msgid "None." |
| 396 |
msgstr "" |
| 397 |
|
| 398 |
#. type: SH |
| 399 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 400 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 401 |
#, no-wrap |
| 402 |
msgid "HISTORY" |
| 403 |
msgstr "" |
| 404 |
|
| 405 |
#. type: TP |
| 406 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 407 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 408 |
#, no-wrap |
| 409 |
msgid "B<mallinfo>()" |
| 410 |
msgstr "" |
| 411 |
|
| 412 |
#. type: Plain text |
| 413 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 414 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 415 |
msgid "glibc 2.0. SVID." |
| 416 |
msgstr "" |
| 417 |
|
| 418 |
#. type: TP |
| 419 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 420 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 421 |
#, no-wrap |
| 422 |
msgid "B<mallinfo2>()" |
| 423 |
msgstr "" |
| 424 |
|
| 425 |
#. commit e3960d1c57e57f33e0e846d615788f4ede73b945 |
| 426 |
#. type: Plain text |
| 427 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 428 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 429 |
msgid "glibc 2.33." |
| 430 |
msgstr "" |
| 431 |
|
| 432 |
#. type: SH |
| 433 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 434 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 435 |
#, no-wrap |
| 436 |
msgid "BUGS" |
| 437 |
msgstr "" |
| 438 |
|
| 439 |
#. FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208 |
| 440 |
#. See the 24 Aug 2011 mail by Paul Pluzhnikov: |
| 441 |
#. "[patch] Fix mallinfo() to accumulate results for all arenas" |
| 442 |
#. on [email protected] |
| 443 |
#. type: Plain text |
| 444 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 445 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 446 |
msgid "" |
| 447 |
"B<Information is returned for only the main memory allocation area.> " |
| 448 |
"Allocations in other arenas are excluded. See B<malloc_stats>(3) and " |
| 449 |
"B<malloc_info>(3) for alternatives that include information about other " |
| 450 |
"arenas." |
| 451 |
msgstr "" |
| 452 |
|
| 453 |
#. type: Plain text |
| 454 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 455 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 456 |
msgid "" |
| 457 |
"The fields of the I<mallinfo> structure that is returned by the older " |
| 458 |
"B<mallinfo>() function are typed as I<int>. However, because some internal " |
| 459 |
"bookkeeping values may be of type I<long>, the reported values may wrap " |
| 460 |
"around zero and thus be inaccurate." |
| 461 |
msgstr "" |
| 462 |
|
| 463 |
#. type: SH |
| 464 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 465 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 466 |
#, no-wrap |
| 467 |
msgid "EXAMPLES" |
| 468 |
msgstr "" |
| 469 |
|
| 470 |
#. type: Plain text |
| 471 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 472 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 473 |
msgid "" |
| 474 |
"The program below employs B<mallinfo2>() to retrieve memory allocation " |
| 475 |
"statistics before and after allocating and freeing some blocks of memory. " |
| 476 |
"The statistics are displayed on standard output." |
| 477 |
msgstr "" |
| 478 |
|
| 479 |
#. type: Plain text |
| 480 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 481 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 482 |
msgid "" |
| 483 |
"The first two command-line arguments specify the number and size of blocks " |
| 484 |
"to be allocated with B<malloc>(3)." |
| 485 |
msgstr "" |
| 486 |
|
| 487 |
#. type: Plain text |
| 488 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 489 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 490 |
msgid "" |
| 491 |
"The remaining three arguments specify which of the allocated blocks should " |
| 492 |
"be freed with B<free>(3). These three arguments are optional, and specify " |
| 493 |
"(in order): the step size to be used in the loop that frees blocks (the " |
| 494 |
"default is 1, meaning free all blocks in the range); the ordinal position of " |
| 495 |
"the first block to be freed (default 0, meaning the first allocated block); " |
| 496 |
"and a number one greater than the ordinal position of the last block to be " |
| 497 |
"freed (default is one greater than the maximum block number). If these " |
| 498 |
"three arguments are omitted, then the defaults cause all allocated blocks to " |
| 499 |
"be freed." |
| 500 |
msgstr "" |
| 501 |
|
| 502 |
#. type: Plain text |
| 503 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 504 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 505 |
msgid "" |
| 506 |
"In the following example run of the program, 1000 allocations of 100 bytes " |
| 507 |
"are performed, and then every second allocated block is freed:" |
| 508 |
msgstr "" |
| 509 |
|
| 510 |
#. type: Plain text |
| 511 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 512 |
#: opensuse-tumbleweed |
| 513 |
#, no-wrap |
| 514 |
msgid "" |
| 515 |
"$B< ./a.out 1000 100 2>;\n" |
| 516 |
"============== Before allocating blocks ==============\n" |
| 517 |
"Total non-mmapped bytes (arena): 0\n" |
| 518 |
"# of free chunks (ordblks): 1\n" |
| 519 |
"# of free fastbin blocks (smblks): 0\n" |
| 520 |
"# of mapped regions (hblks): 0\n" |
| 521 |
"Bytes in mapped regions (hblkhd): 0\n" |
| 522 |
"Max.\\& total allocated space (usmblks): 0\n" |
| 523 |
"Free bytes held in fastbins (fsmblks): 0\n" |
| 524 |
"Total allocated space (uordblks): 0\n" |
| 525 |
"Total free space (fordblks): 0\n" |
| 526 |
"Topmost releasable block (keepcost): 0\n" |
| 527 |
"\\&\n" |
| 528 |
"============== After allocating blocks ==============\n" |
| 529 |
"Total non-mmapped bytes (arena): 135168\n" |
| 530 |
"# of free chunks (ordblks): 1\n" |
| 531 |
"# of free fastbin blocks (smblks): 0\n" |
| 532 |
"# of mapped regions (hblks): 0\n" |
| 533 |
"Bytes in mapped regions (hblkhd): 0\n" |
| 534 |
"Max.\\& total allocated space (usmblks): 0\n" |
| 535 |
"Free bytes held in fastbins (fsmblks): 0\n" |
| 536 |
"Total allocated space (uordblks): 104000\n" |
| 537 |
"Total free space (fordblks): 31168\n" |
| 538 |
"Topmost releasable block (keepcost): 31168\n" |
| 539 |
"\\&\n" |
| 540 |
"============== After freeing blocks ==============\n" |
| 541 |
"Total non-mmapped bytes (arena): 135168\n" |
| 542 |
"# of free chunks (ordblks): 501\n" |
| 543 |
"# of free fastbin blocks (smblks): 0\n" |
| 544 |
"# of mapped regions (hblks): 0\n" |
| 545 |
"Bytes in mapped regions (hblkhd): 0\n" |
| 546 |
"Max.\\& total allocated space (usmblks): 0\n" |
| 547 |
"Free bytes held in fastbins (fsmblks): 0\n" |
| 548 |
"Total allocated space (uordblks): 52000\n" |
| 549 |
"Total free space (fordblks): 83168\n" |
| 550 |
"Topmost releasable block (keepcost): 31168\n" |
| 551 |
msgstr "" |
| 552 |
|
| 553 |
#. type: SS |
| 554 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 555 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 556 |
#, no-wrap |
| 557 |
msgid "Program source" |
| 558 |
msgstr "" |
| 559 |
|
| 560 |
#. type: Plain text |
| 561 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 562 |
#, no-wrap |
| 563 |
msgid "" |
| 564 |
"#include E<lt>malloc.hE<gt>\n" |
| 565 |
"#include E<lt>stdlib.hE<gt>\n" |
| 566 |
"#include E<lt>string.hE<gt>\n" |
| 567 |
"\\&\n" |
| 568 |
"#define streq(...) (strcmp(__VA_ARGS__) == 0)\n" |
| 569 |
"\\&\n" |
| 570 |
"static void\n" |
| 571 |
"display_mallinfo2(void)\n" |
| 572 |
"{\n" |
| 573 |
" struct mallinfo2 mi;\n" |
| 574 |
"\\&\n" |
| 575 |
" mi = mallinfo2();\n" |
| 576 |
"\\&\n" |
| 577 |
" printf(\"Total non-mmapped bytes (arena): %zu\\[rs]n\", mi.arena);\n" |
| 578 |
" printf(\"# of free chunks (ordblks): %zu\\[rs]n\", mi.ordblks);\n" |
| 579 |
" printf(\"# of free fastbin blocks (smblks): %zu\\[rs]n\", mi.smblks);\n" |
| 580 |
" printf(\"# of mapped regions (hblks): %zu\\[rs]n\", mi.hblks);\n" |
| 581 |
" printf(\"Bytes in mapped regions (hblkhd): %zu\\[rs]n\", mi.hblkhd);\n" |
| 582 |
" printf(\"Max.\\& total allocated space (usmblks): %zu\\[rs]n\", mi.usmblks);\n" |
| 583 |
" printf(\"Free bytes held in fastbins (fsmblks): %zu\\[rs]n\", mi.fsmblks);\n" |
| 584 |
" printf(\"Total allocated space (uordblks): %zu\\[rs]n\", mi.uordblks);\n" |
| 585 |
" printf(\"Total free space (fordblks): %zu\\[rs]n\", mi.fordblks);\n" |
| 586 |
" printf(\"Topmost releasable block (keepcost): %zu\\[rs]n\", mi.keepcost);\n" |
| 587 |
"}\n" |
| 588 |
"\\&\n" |
| 589 |
"int\n" |
| 590 |
"main(int argc, char *argv[])\n" |
| 591 |
"{\n" |
| 592 |
"#define MAX_ALLOCS 500000\n" |
| 593 |
" char *alloc[MAX_ALLOCS];\n" |
| 594 |
" size_t blockSize, numBlocks, freeBegin, freeEnd, freeStep;\n" |
| 595 |
"\\&\n" |
| 596 |
" if (argc E<lt> 3 || streq(argv[1], \"--help\")) {\n" |
| 597 |
" fprintf(stderr, \"%s num-blocks block-size [free-step \"\n" |
| 598 |
" \"[start-free [end-free]]]\\[rs]n\", argv[0]);\n" |
| 599 |
" exit(EXIT_FAILURE);\n" |
| 600 |
" }\n" |
| 601 |
"\\&\n" |
| 602 |
" numBlocks = atoi(argv[1]);\n" |
| 603 |
" blockSize = atoi(argv[2]);\n" |
| 604 |
" freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n" |
| 605 |
" freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n" |
| 606 |
" freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n" |
| 607 |
"\\&\n" |
| 608 |
" printf(\"============== Before allocating blocks ==============\\[rs]n\");\n" |
| 609 |
" display_mallinfo2();\n" |
| 610 |
"\\&\n" |
| 611 |
" for (size_t j = 0; j E<lt> numBlocks; j++) {\n" |
| 612 |
" if (numBlocks E<gt>= MAX_ALLOCS) {\n" |
| 613 |
" fprintf(stderr, \"Too many allocations\\[rs]n\");\n" |
| 614 |
" exit(EXIT_FAILURE);\n" |
| 615 |
" }\n" |
| 616 |
"\\&\n" |
| 617 |
" alloc[j] = malloc(blockSize);\n" |
| 618 |
" if (alloc[j] == NULL) {\n" |
| 619 |
" perror(\"malloc\");\n" |
| 620 |
" exit(EXIT_FAILURE);\n" |
| 621 |
" }\n" |
| 622 |
" }\n" |
| 623 |
"\\&\n" |
| 624 |
" printf(\"\\[rs]n============== After allocating blocks ==============\\[rs]n\");\n" |
| 625 |
" display_mallinfo2();\n" |
| 626 |
"\\&\n" |
| 627 |
" for (size_t j = freeBegin; j E<lt> freeEnd; j += freeStep)\n" |
| 628 |
" free(alloc[j]);\n" |
| 629 |
"\\&\n" |
| 630 |
" printf(\"\\[rs]n============== After freeing blocks ==============\\[rs]n\");\n" |
| 631 |
" display_mallinfo2();\n" |
| 632 |
"\\&\n" |
| 633 |
" exit(EXIT_SUCCESS);\n" |
| 634 |
"}\n" |
| 635 |
msgstr "" |
| 636 |
|
| 637 |
#. SRC END |
| 638 |
#. type: SH |
| 639 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 640 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 641 |
#, no-wrap |
| 642 |
msgid "SEE ALSO" |
| 643 |
msgstr "" |
| 644 |
|
| 645 |
#. type: Plain text |
| 646 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 647 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 648 |
msgid "" |
| 649 |
"B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), " |
| 650 |
"B<malloc_trim>(3), B<mallopt>(3)" |
| 651 |
msgstr "" |
| 652 |
|
| 653 |
#. type: TH |
| 654 |
#: debian-trixie |
| 655 |
#, no-wrap |
| 656 |
msgid "2024-06-15" |
| 657 |
msgstr "" |
| 658 |
|
| 659 |
#. type: TH |
| 660 |
#: debian-trixie |
| 661 |
#, no-wrap |
| 662 |
msgid "Linux man-pages 6.9.1" |
| 663 |
msgstr "" |
| 664 |
|
| 665 |
#. type: Plain text |
| 666 |
#: debian-trixie |
| 667 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 668 |
msgstr "" |
| 669 |
|
| 670 |
#. type: Plain text |
| 671 |
#: debian-trixie fedora-44 fedora-rawhide |
| 672 |
#, no-wrap |
| 673 |
msgid "" |
| 674 |
"$ B<./a.out 1000 100 2>\n" |
| 675 |
"============== Before allocating blocks ==============\n" |
| 676 |
"Total non-mmapped bytes (arena): 0\n" |
| 677 |
"# of free chunks (ordblks): 1\n" |
| 678 |
"# of free fastbin blocks (smblks): 0\n" |
| 679 |
"# of mapped regions (hblks): 0\n" |
| 680 |
"Bytes in mapped regions (hblkhd): 0\n" |
| 681 |
"Max. total allocated space (usmblks): 0\n" |
| 682 |
"Free bytes held in fastbins (fsmblks): 0\n" |
| 683 |
"Total allocated space (uordblks): 0\n" |
| 684 |
"Total free space (fordblks): 0\n" |
| 685 |
"Topmost releasable block (keepcost): 0\n" |
| 686 |
"\\&\n" |
| 687 |
"============== After allocating blocks ==============\n" |
| 688 |
"Total non-mmapped bytes (arena): 135168\n" |
| 689 |
"# of free chunks (ordblks): 1\n" |
| 690 |
"# of free fastbin blocks (smblks): 0\n" |
| 691 |
"# of mapped regions (hblks): 0\n" |
| 692 |
"Bytes in mapped regions (hblkhd): 0\n" |
| 693 |
"Max. total allocated space (usmblks): 0\n" |
| 694 |
"Free bytes held in fastbins (fsmblks): 0\n" |
| 695 |
"Total allocated space (uordblks): 104000\n" |
| 696 |
"Total free space (fordblks): 31168\n" |
| 697 |
"Topmost releasable block (keepcost): 31168\n" |
| 698 |
"\\&\n" |
| 699 |
"============== After freeing blocks ==============\n" |
| 700 |
"Total non-mmapped bytes (arena): 135168\n" |
| 701 |
"# of free chunks (ordblks): 501\n" |
| 702 |
"# of free fastbin blocks (smblks): 0\n" |
| 703 |
"# of mapped regions (hblks): 0\n" |
| 704 |
"Bytes in mapped regions (hblkhd): 0\n" |
| 705 |
"Max. total allocated space (usmblks): 0\n" |
| 706 |
"Free bytes held in fastbins (fsmblks): 0\n" |
| 707 |
"Total allocated space (uordblks): 52000\n" |
| 708 |
"Total free space (fordblks): 83168\n" |
| 709 |
"Topmost releasable block (keepcost): 31168\n" |
| 710 |
msgstr "" |
| 711 |
|
| 712 |
#. type: Plain text |
| 713 |
#: debian-trixie fedora-44 fedora-rawhide |
| 714 |
#, no-wrap |
| 715 |
msgid "" |
| 716 |
"#include E<lt>malloc.hE<gt>\n" |
| 717 |
"#include E<lt>stdlib.hE<gt>\n" |
| 718 |
"#include E<lt>string.hE<gt>\n" |
| 719 |
"\\&\n" |
| 720 |
"static void\n" |
| 721 |
"display_mallinfo2(void)\n" |
| 722 |
"{\n" |
| 723 |
" struct mallinfo2 mi;\n" |
| 724 |
"\\&\n" |
| 725 |
" mi = mallinfo2();\n" |
| 726 |
"\\&\n" |
| 727 |
" printf(\"Total non-mmapped bytes (arena): %zu\\[rs]n\", mi.arena);\n" |
| 728 |
" printf(\"# of free chunks (ordblks): %zu\\[rs]n\", mi.ordblks);\n" |
| 729 |
" printf(\"# of free fastbin blocks (smblks): %zu\\[rs]n\", mi.smblks);\n" |
| 730 |
" printf(\"# of mapped regions (hblks): %zu\\[rs]n\", mi.hblks);\n" |
| 731 |
" printf(\"Bytes in mapped regions (hblkhd): %zu\\[rs]n\", mi.hblkhd);\n" |
| 732 |
" printf(\"Max. total allocated space (usmblks): %zu\\[rs]n\", mi.usmblks);\n" |
| 733 |
" printf(\"Free bytes held in fastbins (fsmblks): %zu\\[rs]n\", mi.fsmblks);\n" |
| 734 |
" printf(\"Total allocated space (uordblks): %zu\\[rs]n\", mi.uordblks);\n" |
| 735 |
" printf(\"Total free space (fordblks): %zu\\[rs]n\", mi.fordblks);\n" |
| 736 |
" printf(\"Topmost releasable block (keepcost): %zu\\[rs]n\", mi.keepcost);\n" |
| 737 |
"}\n" |
| 738 |
"\\&\n" |
| 739 |
"int\n" |
| 740 |
"main(int argc, char *argv[])\n" |
| 741 |
"{\n" |
| 742 |
"#define MAX_ALLOCS 2000000\n" |
| 743 |
" char *alloc[MAX_ALLOCS];\n" |
| 744 |
" size_t blockSize, numBlocks, freeBegin, freeEnd, freeStep;\n" |
| 745 |
"\\&\n" |
| 746 |
" if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0) {\n" |
| 747 |
" fprintf(stderr, \"%s num-blocks block-size [free-step \"\n" |
| 748 |
" \"[start-free [end-free]]]\\[rs]n\", argv[0]);\n" |
| 749 |
" exit(EXIT_FAILURE);\n" |
| 750 |
" }\n" |
| 751 |
"\\&\n" |
| 752 |
" numBlocks = atoi(argv[1]);\n" |
| 753 |
" blockSize = atoi(argv[2]);\n" |
| 754 |
" freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n" |
| 755 |
" freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n" |
| 756 |
" freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n" |
| 757 |
"\\&\n" |
| 758 |
" printf(\"============== Before allocating blocks ==============\\[rs]n\");\n" |
| 759 |
" display_mallinfo2();\n" |
| 760 |
"\\&\n" |
| 761 |
" for (size_t j = 0; j E<lt> numBlocks; j++) {\n" |
| 762 |
" if (numBlocks E<gt>= MAX_ALLOCS) {\n" |
| 763 |
" fprintf(stderr, \"Too many allocations\\[rs]n\");\n" |
| 764 |
" exit(EXIT_FAILURE);\n" |
| 765 |
" }\n" |
| 766 |
"\\&\n" |
| 767 |
" alloc[j] = malloc(blockSize);\n" |
| 768 |
" if (alloc[j] == NULL) {\n" |
| 769 |
" perror(\"malloc\");\n" |
| 770 |
" exit(EXIT_FAILURE);\n" |
| 771 |
" }\n" |
| 772 |
" }\n" |
| 773 |
"\\&\n" |
| 774 |
" printf(\"\\[rs]n============== After allocating blocks ==============\\[rs]n\");\n" |
| 775 |
" display_mallinfo2();\n" |
| 776 |
"\\&\n" |
| 777 |
" for (size_t j = freeBegin; j E<lt> freeEnd; j += freeStep)\n" |
| 778 |
" free(alloc[j]);\n" |
| 779 |
"\\&\n" |
| 780 |
" printf(\"\\[rs]n============== After freeing blocks ==============\\[rs]n\");\n" |
| 781 |
" display_mallinfo2();\n" |
| 782 |
"\\&\n" |
| 783 |
" exit(EXIT_SUCCESS);\n" |
| 784 |
"}\n" |
| 785 |
msgstr "" |
| 786 |
|
| 787 |
#. type: TH |
| 788 |
#: fedora-44 fedora-rawhide |
| 789 |
#, no-wrap |
| 790 |
msgid "2024-07-23" |
| 791 |
msgstr "" |
| 792 |
|
| 793 |
#. type: TH |
| 794 |
#: fedora-44 fedora-rawhide |
| 795 |
#, no-wrap |
| 796 |
msgid "Linux man-pages 6.13" |
| 797 |
msgstr "" |
| 798 |
|
| 799 |
#. type: TH |
| 800 |
#: mageia-cauldron |
| 801 |
#, no-wrap |
| 802 |
msgid "2026-02-08" |
| 803 |
msgstr "" |
| 804 |
|
| 805 |
#. type: TH |
| 806 |
#: mageia-cauldron |
| 807 |
#, no-wrap |
| 808 |
msgid "Linux man-pages 6.17" |
| 809 |
msgstr "" |
| 810 |
|
| 811 |
#. type: Plain text |
| 812 |
#: mageia-cauldron |
| 813 |
#, no-wrap |
| 814 |
msgid "" |
| 815 |
"#include E<lt>malloc.hE<gt>\n" |
| 816 |
"#include E<lt>stdlib.hE<gt>\n" |
| 817 |
"#include E<lt>string.hE<gt>\n" |
| 818 |
"\\&\n" |
| 819 |
"static void\n" |
| 820 |
"display_mallinfo2(void)\n" |
| 821 |
"{\n" |
| 822 |
" struct mallinfo2 mi;\n" |
| 823 |
"\\&\n" |
| 824 |
" mi = mallinfo2();\n" |
| 825 |
"\\&\n" |
| 826 |
" printf(\"Total non-mmapped bytes (arena): %zu\\[rs]n\", mi.arena);\n" |
| 827 |
" printf(\"# of free chunks (ordblks): %zu\\[rs]n\", mi.ordblks);\n" |
| 828 |
" printf(\"# of free fastbin blocks (smblks): %zu\\[rs]n\", mi.smblks);\n" |
| 829 |
" printf(\"# of mapped regions (hblks): %zu\\[rs]n\", mi.hblks);\n" |
| 830 |
" printf(\"Bytes in mapped regions (hblkhd): %zu\\[rs]n\", mi.hblkhd);\n" |
| 831 |
" printf(\"Max.\\& total allocated space (usmblks): %zu\\[rs]n\", mi.usmblks);\n" |
| 832 |
" printf(\"Free bytes held in fastbins (fsmblks): %zu\\[rs]n\", mi.fsmblks);\n" |
| 833 |
" printf(\"Total allocated space (uordblks): %zu\\[rs]n\", mi.uordblks);\n" |
| 834 |
" printf(\"Total free space (fordblks): %zu\\[rs]n\", mi.fordblks);\n" |
| 835 |
" printf(\"Topmost releasable block (keepcost): %zu\\[rs]n\", mi.keepcost);\n" |
| 836 |
"}\n" |
| 837 |
"\\&\n" |
| 838 |
"int\n" |
| 839 |
"main(int argc, char *argv[])\n" |
| 840 |
"{\n" |
| 841 |
"#define MAX_ALLOCS 500000\n" |
| 842 |
" char *alloc[MAX_ALLOCS];\n" |
| 843 |
" size_t blockSize, numBlocks, freeBegin, freeEnd, freeStep;\n" |
| 844 |
"\\&\n" |
| 845 |
" if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0) {\n" |
| 846 |
" fprintf(stderr, \"%s num-blocks block-size [free-step \"\n" |
| 847 |
" \"[start-free [end-free]]]\\[rs]n\", argv[0]);\n" |
| 848 |
" exit(EXIT_FAILURE);\n" |
| 849 |
" }\n" |
| 850 |
"\\&\n" |
| 851 |
" numBlocks = atoi(argv[1]);\n" |
| 852 |
" blockSize = atoi(argv[2]);\n" |
| 853 |
" freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n" |
| 854 |
" freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n" |
| 855 |
" freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n" |
| 856 |
"\\&\n" |
| 857 |
" printf(\"============== Before allocating blocks ==============\\[rs]n\");\n" |
| 858 |
" display_mallinfo2();\n" |
| 859 |
"\\&\n" |
| 860 |
" for (size_t j = 0; j E<lt> numBlocks; j++) {\n" |
| 861 |
" if (numBlocks E<gt>= MAX_ALLOCS) {\n" |
| 862 |
" fprintf(stderr, \"Too many allocations\\[rs]n\");\n" |
| 863 |
" exit(EXIT_FAILURE);\n" |
| 864 |
" }\n" |
| 865 |
"\\&\n" |
| 866 |
" alloc[j] = malloc(blockSize);\n" |
| 867 |
" if (alloc[j] == NULL) {\n" |
| 868 |
" perror(\"malloc\");\n" |
| 869 |
" exit(EXIT_FAILURE);\n" |
| 870 |
" }\n" |
| 871 |
" }\n" |
| 872 |
"\\&\n" |
| 873 |
" printf(\"\\[rs]n============== After allocating blocks ==============\\[rs]n\");\n" |
| 874 |
" display_mallinfo2();\n" |
| 875 |
"\\&\n" |
| 876 |
" for (size_t j = freeBegin; j E<lt> freeEnd; j += freeStep)\n" |
| 877 |
" free(alloc[j]);\n" |
| 878 |
"\\&\n" |
| 879 |
" printf(\"\\[rs]n============== After freeing blocks ==============\\[rs]n\");\n" |
| 880 |
" display_mallinfo2();\n" |
| 881 |
"\\&\n" |
| 882 |
" exit(EXIT_SUCCESS);\n" |
| 883 |
"}\n" |
| 884 |
msgstr "" |
| 885 |
|
| 886 |
#. type: TH |
| 887 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 888 |
#, no-wrap |
| 889 |
msgid "Linux man-pages (unreleased)" |
| 890 |
msgstr "" |