caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Eric Dahlman <edahlman@atcorp.com>
Cc: carette@mcmaster.ca, "'Richard Jones'" <rich@annexia.org>,
	caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Out_of_memory exception in output_value
Date: 29 May 2004 17:13:26 +1000	[thread overview]
Message-ID: <1085814805.3036.151.camel@pelican.wigram> (raw)
In-Reply-To: <3037847D-B0E9-11D8-AF42-000393914EAA@atcorp.com>

On Sat, 2004-05-29 at 06:54, Eric Dahlman wrote:
> On May 28, 2004, at 2:44 PM, skaller wrote:

> >> Wouldn't it be more system-friendly to try successively factors *2, 
> >> *1.5,
> >> *1.1, and *1.05 before actually failing?
> 
> I am not sure that it would have that much benefit for all of the 
> complexity it would introduce. 

I don't quite agree for the following reason: if something
fails when you're only using 50% of memory instead of 90%,
you're likely to be both puzzled and annoyed. In practice
this can make quite a difference at what sized problems
you can handle on your machine. It can also really trash out
a large server because malloc() is *required* to actually
allocate memory, not just address space.

Since allocations of this kind are rare the extra cost
doing a most sophisticated calculation isn't important.

As you point out though, the extra complexity is a real
problem: we could argue forever how to choose an optimial
calculation. Which is why I suggested the user be able
to do it. This delegates the complexity back to the
client and out of the library.

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


      reply	other threads:[~2004-05-29  7:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-28  9:10 Richard Jones
2004-05-28 14:31 ` Richard Jones
2004-05-28 16:47   ` Jacques Carette
2004-05-28 19:44     ` skaller
2004-05-28 20:54       ` Eric Dahlman
2004-05-29  7:13         ` skaller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1085814805.3036.151.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@inria.fr \
    --cc=carette@mcmaster.ca \
    --cc=edahlman@atcorp.com \
    --cc=rich@annexia.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).