| 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 "__malloc_hook" |
| 24 |
msgstr "" |
| 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 "" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "" |
| 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_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, " |
| 51 |
"__realloc_hook, __after_morecore_hook - malloc debugging variables " |
| 52 |
"(DEPRECATED)" |
| 53 |
msgstr "" |
| 54 |
|
| 55 |
#. type: SH |
| 56 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 57 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 58 |
#, no-wrap |
| 59 |
msgid "LIBRARY" |
| 60 |
msgstr "" |
| 61 |
|
| 62 |
#. type: Plain text |
| 63 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 64 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 65 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 66 |
msgstr "" |
| 67 |
|
| 68 |
#. type: SH |
| 69 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 70 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 71 |
#, no-wrap |
| 72 |
msgid "SYNOPSIS" |
| 73 |
msgstr "" |
| 74 |
|
| 75 |
#. type: Plain text |
| 76 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 77 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 78 |
#, no-wrap |
| 79 |
msgid "B<#include E<lt>malloc.hE<gt>>\n" |
| 80 |
msgstr "" |
| 81 |
|
| 82 |
#. type: Plain text |
| 83 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 84 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 85 |
#, no-wrap |
| 86 |
msgid "" |
| 87 |
"B<typeof(void *(size_t >I<size>B<, const void *>I<caller>B<))>\n" |
| 88 |
"B<*volatile __malloc_hook;>\n" |
| 89 |
msgstr "" |
| 90 |
|
| 91 |
#. type: Plain text |
| 92 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 93 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 94 |
#, no-wrap |
| 95 |
msgid "" |
| 96 |
"B<typeof(void *(void *>I<p>B<, size_t >I<size>B<, const void *>I<caller>B<))>\n" |
| 97 |
"B<*volatile __realloc_hook;>\n" |
| 98 |
msgstr "" |
| 99 |
|
| 100 |
#. type: Plain text |
| 101 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 102 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 103 |
#, no-wrap |
| 104 |
msgid "" |
| 105 |
"B<typeof(void *(size_t >I<align>B<, size_t >I<size>B<, const void *>I<caller>B<))>\n" |
| 106 |
"B<*volatile __memalign_hook;>\n" |
| 107 |
msgstr "" |
| 108 |
|
| 109 |
#. type: Plain text |
| 110 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 111 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 112 |
#, no-wrap |
| 113 |
msgid "" |
| 114 |
"B<typeof(void *(void *>I<p>B<, const void *>I<caller>B<))>\n" |
| 115 |
"B<*volatile __free_hook;>\n" |
| 116 |
msgstr "" |
| 117 |
|
| 118 |
#. type: Plain text |
| 119 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 120 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
#, no-wrap |
| 122 |
msgid "" |
| 123 |
"B<typeof(void (void)) *__malloc_initialize_hook;>\n" |
| 124 |
"B<typeof(void (void)) *volatile __after_mrecore_hook;>\n" |
| 125 |
msgstr "" |
| 126 |
|
| 127 |
#. type: SH |
| 128 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 129 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 130 |
#, no-wrap |
| 131 |
msgid "DESCRIPTION" |
| 132 |
msgstr "" |
| 133 |
|
| 134 |
#. type: Plain text |
| 135 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 136 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 137 |
msgid "" |
| 138 |
"The GNU C library lets you modify the behavior of B<malloc>(3), " |
| 139 |
"B<realloc>(3), and B<free>(3) by specifying appropriate hook functions. " |
| 140 |
"You can use these hooks to help you debug programs that use dynamic memory " |
| 141 |
"allocation, for example." |
| 142 |
msgstr "" |
| 143 |
|
| 144 |
#. type: Plain text |
| 145 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 146 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 147 |
msgid "" |
| 148 |
"The variable B<__malloc_initialize_hook> points at a function that is called " |
| 149 |
"once when the malloc implementation is initialized. This is a weak " |
| 150 |
"variable, so it can be overridden in the application with a definition like " |
| 151 |
"the following:" |
| 152 |
msgstr "" |
| 153 |
|
| 154 |
#. type: Plain text |
| 155 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 156 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 157 |
#, no-wrap |
| 158 |
msgid "typeof(void (void)) *__malloc_initialize_hook = my_init_hook;\n" |
| 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 |
"Now the function I<my_init_hook>() can do the initialization of all hooks." |
| 166 |
msgstr "" |
| 167 |
|
| 168 |
#. type: Plain text |
| 169 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 170 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 171 |
msgid "" |
| 172 |
"The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, " |
| 173 |
"B<__memalign_hook>, B<__free_hook> have a prototype like the functions " |
| 174 |
"B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, " |
| 175 |
"except that they have a final argument I<caller> that gives the address of " |
| 176 |
"the caller of B<malloc>(3), etc." |
| 177 |
msgstr "" |
| 178 |
|
| 179 |
#. type: Plain text |
| 180 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 181 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 182 |
msgid "" |
| 183 |
"The variable B<__after_morecore_hook> points at a function that is called " |
| 184 |
"each time after B<sbrk>(2) was asked for more memory." |
| 185 |
msgstr "" |
| 186 |
|
| 187 |
#. type: SH |
| 188 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 189 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 190 |
#, no-wrap |
| 191 |
msgid "STANDARDS" |
| 192 |
msgstr "" |
| 193 |
|
| 194 |
#. type: Plain text |
| 195 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 196 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 197 |
msgid "GNU." |
| 198 |
msgstr "" |
| 199 |
|
| 200 |
#. type: SH |
| 201 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 202 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 203 |
#, no-wrap |
| 204 |
msgid "NOTES" |
| 205 |
msgstr "" |
| 206 |
|
| 207 |
#. https://bugzilla.redhat.com/show_bug.cgi?id=450187 |
| 208 |
#. http://sourceware.org/bugzilla/show_bug.cgi?id=9957 |
| 209 |
#. type: Plain text |
| 210 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 211 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 212 |
msgid "" |
| 213 |
"The use of these hook functions is not safe in multithreaded programs, and " |
| 214 |
"they are now deprecated. From glibc 2.24 onwards, the " |
| 215 |
"B<__malloc_initialize_hook> variable has been removed from the API, and from " |
| 216 |
"glibc 2.34 onwards, all the hook variables have been removed from the API. " |
| 217 |
"Programmers should instead preempt calls to the relevant functions by " |
| 218 |
"defining and exporting B<malloc>(), B<free>(), B<realloc>(), and B<calloc>()." |
| 219 |
msgstr "" |
| 220 |
|
| 221 |
#. type: SH |
| 222 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 223 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 224 |
#, no-wrap |
| 225 |
msgid "EXAMPLES" |
| 226 |
msgstr "" |
| 227 |
|
| 228 |
#. type: Plain text |
| 229 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 230 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 231 |
msgid "Here is a short example of how to use these variables." |
| 232 |
msgstr "" |
| 233 |
|
| 234 |
#. type: Plain text |
| 235 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 236 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 237 |
#, no-wrap |
| 238 |
msgid "" |
| 239 |
"#include E<lt>stdio.hE<gt>\n" |
| 240 |
"#include E<lt>malloc.hE<gt>\n" |
| 241 |
"\\&\n" |
| 242 |
"/* Prototypes for our hooks */\n" |
| 243 |
"static void my_init_hook(void);\n" |
| 244 |
"static void *my_malloc_hook(size_t, const void *);\n" |
| 245 |
"\\&\n" |
| 246 |
"/* Variables to save original hooks */\n" |
| 247 |
"static typeof(void *(size_t, const void *)) *old_malloc_hook;\n" |
| 248 |
"\\&\n" |
| 249 |
"/* Override initializing hook from the C library */\n" |
| 250 |
"typeof(void (void)) *__malloc_initialize_hook = my_init_hook;\n" |
| 251 |
"\\&\n" |
| 252 |
"static void\n" |
| 253 |
"my_init_hook(void)\n" |
| 254 |
"{\n" |
| 255 |
" old_malloc_hook = __malloc_hook;\n" |
| 256 |
" __malloc_hook = my_malloc_hook;\n" |
| 257 |
"}\n" |
| 258 |
"\\&\n" |
| 259 |
"static void *\n" |
| 260 |
"my_malloc_hook(size_t size, const void *caller)\n" |
| 261 |
"{\n" |
| 262 |
" void *result;\n" |
| 263 |
"\\&\n" |
| 264 |
" /* Restore all old hooks */\n" |
| 265 |
" __malloc_hook = old_malloc_hook;\n" |
| 266 |
"\\&\n" |
| 267 |
" /* Call recursively */\n" |
| 268 |
" result = malloc(size);\n" |
| 269 |
"\\&\n" |
| 270 |
" /* Save underlying hooks */\n" |
| 271 |
" old_malloc_hook = __malloc_hook;\n" |
| 272 |
"\\&\n" |
| 273 |
" /* printf() might call malloc(), so protect it too */\n" |
| 274 |
" printf(\"malloc(%zu) called from %p returns %p\\[rs]n\",\n" |
| 275 |
" size, caller, result);\n" |
| 276 |
"\\&\n" |
| 277 |
" /* Restore our own hooks */\n" |
| 278 |
" __malloc_hook = my_malloc_hook;\n" |
| 279 |
"\\&\n" |
| 280 |
" return result;\n" |
| 281 |
"}\n" |
| 282 |
msgstr "" |
| 283 |
|
| 284 |
#. type: SH |
| 285 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 286 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 287 |
#, no-wrap |
| 288 |
msgid "SEE ALSO" |
| 289 |
msgstr "" |
| 290 |
|
| 291 |
#. type: Plain text |
| 292 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 293 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 294 |
msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)" |
| 295 |
msgstr "" |
| 296 |
|
| 297 |
#. type: TH |
| 298 |
#: debian-trixie |
| 299 |
#, no-wrap |
| 300 |
msgid "2024-06-15" |
| 301 |
msgstr "" |
| 302 |
|
| 303 |
#. type: TH |
| 304 |
#: debian-trixie |
| 305 |
#, no-wrap |
| 306 |
msgid "Linux man-pages 6.9.1" |
| 307 |
msgstr "" |
| 308 |
|
| 309 |
#. type: Plain text |
| 310 |
#: debian-trixie |
| 311 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 312 |
msgstr "" |
| 313 |
|
| 314 |
#. type: Plain text |
| 315 |
#: debian-trixie |
| 316 |
#, no-wrap |
| 317 |
msgid "B<void *(*volatile __malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n" |
| 318 |
msgstr "" |
| 319 |
|
| 320 |
#. type: Plain text |
| 321 |
#: debian-trixie |
| 322 |
#, no-wrap |
| 323 |
msgid "" |
| 324 |
"B<void *(*volatile __realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<,>\n" |
| 325 |
"B< const void *>I<caller>B<);>\n" |
| 326 |
msgstr "" |
| 327 |
|
| 328 |
#. type: Plain text |
| 329 |
#: debian-trixie |
| 330 |
#, no-wrap |
| 331 |
msgid "" |
| 332 |
"B<void *(*volatile __memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n" |
| 333 |
"B< const void *>I<caller>B<);>\n" |
| 334 |
msgstr "" |
| 335 |
|
| 336 |
#. type: Plain text |
| 337 |
#: debian-trixie |
| 338 |
#, no-wrap |
| 339 |
msgid "B<void (*volatile __free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n" |
| 340 |
msgstr "" |
| 341 |
|
| 342 |
#. type: Plain text |
| 343 |
#: debian-trixie |
| 344 |
#, no-wrap |
| 345 |
msgid "B<void (*__malloc_initialize_hook)(void);>\n" |
| 346 |
msgstr "" |
| 347 |
|
| 348 |
#. type: Plain text |
| 349 |
#: debian-trixie |
| 350 |
#, no-wrap |
| 351 |
msgid "B<void (*volatile __after_morecore_hook)(void);>\n" |
| 352 |
msgstr "" |
| 353 |
|
| 354 |
#. type: Plain text |
| 355 |
#: debian-trixie |
| 356 |
#, no-wrap |
| 357 |
msgid "void (*__malloc_initialize_hook)(void) = my_init_hook;\n" |
| 358 |
msgstr "" |
| 359 |
|
| 360 |
#. type: Plain text |
| 361 |
#: debian-trixie |
| 362 |
#, no-wrap |
| 363 |
msgid "" |
| 364 |
"#include E<lt>stdio.hE<gt>\n" |
| 365 |
"#include E<lt>malloc.hE<gt>\n" |
| 366 |
"\\&\n" |
| 367 |
"/* Prototypes for our hooks */\n" |
| 368 |
"static void my_init_hook(void);\n" |
| 369 |
"static void *my_malloc_hook(size_t, const void *);\n" |
| 370 |
"\\&\n" |
| 371 |
"/* Variables to save original hooks */\n" |
| 372 |
"static void *(*old_malloc_hook)(size_t, const void *);\n" |
| 373 |
"\\&\n" |
| 374 |
"/* Override initializing hook from the C library */\n" |
| 375 |
"void (*__malloc_initialize_hook)(void) = my_init_hook;\n" |
| 376 |
"\\&\n" |
| 377 |
"static void\n" |
| 378 |
"my_init_hook(void)\n" |
| 379 |
"{\n" |
| 380 |
" old_malloc_hook = __malloc_hook;\n" |
| 381 |
" __malloc_hook = my_malloc_hook;\n" |
| 382 |
"}\n" |
| 383 |
"\\&\n" |
| 384 |
"static void *\n" |
| 385 |
"my_malloc_hook(size_t size, const void *caller)\n" |
| 386 |
"{\n" |
| 387 |
" void *result;\n" |
| 388 |
"\\&\n" |
| 389 |
" /* Restore all old hooks */\n" |
| 390 |
" __malloc_hook = old_malloc_hook;\n" |
| 391 |
"\\&\n" |
| 392 |
" /* Call recursively */\n" |
| 393 |
" result = malloc(size);\n" |
| 394 |
"\\&\n" |
| 395 |
" /* Save underlying hooks */\n" |
| 396 |
" old_malloc_hook = __malloc_hook;\n" |
| 397 |
"\\&\n" |
| 398 |
" /* printf() might call malloc(), so protect it too */\n" |
| 399 |
" printf(\"malloc(%zu) called from %p returns %p\\[rs]n\",\n" |
| 400 |
" size, caller, result);\n" |
| 401 |
"\\&\n" |
| 402 |
" /* Restore our own hooks */\n" |
| 403 |
" __malloc_hook = my_malloc_hook;\n" |
| 404 |
"\\&\n" |
| 405 |
" return result;\n" |
| 406 |
"}\n" |
| 407 |
msgstr "" |
| 408 |
|
| 409 |
#. type: TH |
| 410 |
#: fedora-44 fedora-rawhide |
| 411 |
#, no-wrap |
| 412 |
msgid "2025-01-05" |
| 413 |
msgstr "" |
| 414 |
|
| 415 |
#. type: TH |
| 416 |
#: fedora-44 fedora-rawhide |
| 417 |
#, no-wrap |
| 418 |
msgid "Linux man-pages 6.13" |
| 419 |
msgstr "" |
| 420 |
|
| 421 |
#. type: TH |
| 422 |
#: mageia-cauldron |
| 423 |
#, no-wrap |
| 424 |
msgid "Linux man-pages 6.17" |
| 425 |
msgstr "" |
| 426 |
|
| 427 |
#. type: TH |
| 428 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 429 |
#, no-wrap |
| 430 |
msgid "Linux man-pages (unreleased)" |
| 431 |
msgstr "" |