Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #12079

Re: Competing criteria

From Phil Carmody <thefatphil_demunged@yahoo.co.uk>
Newsgroups comp.lang.c
Subject Re: Competing criteria
Date 2011-10-25 13:09 +0300
Organization A noiseless patient Spider
Message-ID <87vcrdpem3.fsf@bazspaz.fatphil.org> (permalink)
References (5 earlier) <j7vfkc$goj$1@dont-email.me> <j811ct$b5f$1@dont-email.me> <j8140s$qlk$1@dont-email.me> <bfd2f700-6c31-4ad3-af87-8bb2f2c40912@q13g2000vbd.googlegroups.com> <o0vgn8-fb3.ln1@voyager.wichi.de.vu>

Show all headers | View raw


Markus Wichmann <nullplan@gmx.net> writes:
> On 23.10.2011 15:24, Malcolm McLean wrote:
> > On Oct 23, 3:15 pm, Richard Damon <news.x.richardda...@xoxy.net> wrote:
> >> if the task has a suitable alternative that it
> >> can fall back on if the malloc returns no buffer,
> >
> > People discuss this quite a bit. Technically it's often possible to
> > use a less memory-hungry algorithm if malloc() fails. However it's
> > almost never done in real code, because it means programs become much
> > more difficult to write and to test.

Never used? I can point to several places in the linux kernel where it's 
done (and those are just in Nokia's contributions to the kernel, there 
may be many others).

If you need a contiguous block of physical memory for DMA, for example,
then first you ask for what's ideal, and then reduce your request if
that fails. Lather, rinse, repeat, until it's futile.

> It also means to write more code, some of which is almost never going to
> get used... I mean, it would be like writing a program so that it runs
> both on systems with an FPU and without: You basically have to write it
> twice. It is almost always simpler to just say "Buy an FPU!" or "Buy
> more RAM or enlarge the swap file!"

If the software vendor is also the hardware vendor, then he cannot blame
the user for the version of the hardware that he's shipped.

Phil
-- 
Unix is simple. It just takes a genius to understand its simplicity
-- Dennis Ritchie (1941-2011), Unix Co-Creator

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Competing criteria nroberts <roberts.noah@gmail.com> - 2011-10-21 14:49 -0700
  Re: Competing criteria Seebs <usenet-nospam@seebs.net> - 2011-10-21 22:16 +0000
    Re: Competing criteria Roberto Waltman <usenet@rwaltman.com> - 2011-10-22 14:06 -0400
      Re: Competing criteria Richard Damon <news.x.richarddamon@xoxy.net> - 2011-10-22 16:47 -0400
        Re: Competing criteria Ark <akhasin@macroexpressions.com> - 2011-10-22 17:33 -0400
          Re: Competing criteria Richard Damon <news.x.richarddamon@xoxy.net> - 2011-10-22 18:20 -0400
            Re: Competing criteria Ark <akhasin@macroexpressions.com> - 2011-10-22 21:29 -0400
            Re: Competing criteria "io_x" <a@b.c.invalid> - 2011-10-23 10:32 +0200
              Re: Competing criteria "Joachim Schmitz" <nospam.jojo@schmitz-digital.de> - 2011-10-23 11:06 +0200
                Re: Competing criteria Willem <willem@toad.stack.nl> - 2011-10-23 09:09 +0000
                Re: Competing criteria "io_x" <a@b.c.invalid> - 2011-10-23 12:04 +0200
                Re: Competing criteria "io_x" <a@b.c.invalid> - 2011-10-27 08:44 +0200
                Re: Competing criteria Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-10-23 05:01 -0700
            Re: Competing criteria Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-23 08:29 -0400
              Re: Competing criteria Richard Damon <news.x.richarddamon@xoxy.net> - 2011-10-23 09:15 -0400
                Re: Competing criteria Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-10-23 06:24 -0700
                Re: Competing criteria Markus Wichmann <nullplan@gmx.net> - 2011-10-24 22:39 +0200
                Re: Competing criteria Keith Thompson <kst-u@mib.org> - 2011-10-24 17:10 -0700
                Re: Competing criteria Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-10-25 13:09 +0300
                Re: Competing criteria Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-10-26 00:23 -0700
      Re: Competing criteria Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-10-23 00:02 +0300
      Re: Competing criteria Seebs <usenet-nospam@seebs.net> - 2011-10-24 20:10 +0000
        Re: Competing criteria Richard Damon <news.x.richarddamon@xoxy.net> - 2011-10-24 19:36 -0400
        Re: Competing criteria nroberts <roberts.noah@gmail.com> - 2011-10-25 10:07 -0700
          Re: Competing criteria Richard Damon <news.x.richarddamon@xoxy.net> - 2011-10-25 16:51 -0400
  Re: Competing criteria John Gordon <gordon@panix.com> - 2011-10-21 22:37 +0000
  Re: Competing criteria Richard Damon <news.x.richarddamon@xoxy.net> - 2011-10-21 20:42 -0400

csiph-web