MCPcopy Create free account
hub / github.com/coreutils/coreutils / alloc_obuf

Function alloc_obuf

src/dd.c:694–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692/* Ensure output buffer OBUF is allocated/initialized. */
693
694static void
695alloc_obuf (void)
696{
697 if (obuf)
698 return;
699
700 if (conversions_mask & C_TWOBUFS)
701 {
702 obuf = alignalloc (page_size, output_blocksize);
703 if (!obuf)
704 {
705 char hbuf[LONGEST_HUMAN_READABLE + 1];
706 error (EXIT_FAILURE, 0,
707 _("memory exhausted by output buffer of size %td"
708 " bytes (%s)"),
709 output_blocksize,
710 human_readable (output_blocksize, hbuf,
711 human_opts | human_base_1024, 1, 1));
712 }
713 }
714 else
715 {
716 alloc_ibuf ();
717 obuf = ibuf;
718 }
719}
720
721static void
722translate_charset (char const *new_trans)

Callers 2

skipFunction · 0.85
dd_copyFunction · 0.85

Calls 1

alloc_ibufFunction · 0.85

Tested by

no test coverage detected