Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #9919
| From | yatremblay@bel1lin202.(none) (Yannick Tremblay) |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: bad alloc |
| Date | 2011-09-08 12:11 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <j4abdc$j2e$1@dont-email.me> (permalink) |
| References | <28a1b207-f29e-4d7d-81ca-490aa64bb808@z18g2000yqb.googlegroups.com> <b5f2c1fd-e60f-43ca-bcf0-88a9ba5a7f42@e8g2000vbc.googlegroups.com> <j47hbq$l9b$1@dont-email.me> <45436526-6273-4e83-b074-488db5914edb@a7g2000yqb.googlegroups.com> |
In article <45436526-6273-4e83-b074-488db5914edb@a7g2000yqb.googlegroups.com>, Adam Skutt <askutt@gmail.com> wrote: >On Sep 7, 6:34am, yatremblay@bel1lin202.(none) (Yannick Tremblay) >wrote: >> In article <b5f2c1fd-e60f-43ca-bcf0-88a9ba5a7...@e8g2000vbc.googlegroups.com>, >Adam Skutt <ask...@gmail.com> wrote: >>> No, I'm not sure why you think this follows in the least. I also >>> think I've explained why this isn't the case several times already. >>> If you have per-request bounds and the OS can't give you memory when >>> you ask for it you either need to rewrite your code (so you'll be >>> terminating anyway) or the OS is likely to terminate (so you'll be >>> terminating anyway). >> >> Given a multitasking OS running on a more than one process, there is >> no point in time where you can know how much resources are available. >> What was true a clock cycle ago may now be false. > >There's no way for the application to generally know. There's plenty >of ways for the system designer to know or make more than reasonable >assurances, if it comes to that. The reality of the matter is one can >grant sufficient resources to the system such that exhaustion would be >considered catastrophic. Hence my second reason why you terminate: >the machine ran out of resources and some human being needs to add >more resources. > >That's the best you can do, even preallocating resources. You don't >know if the kernel will overcommit, you don't know if the kernel will >run out of resources for itself, after all. Preallocation only works >if everything your program requires to run preallocates too. Modern, >mainstream operating system kernels do not preallocate most of their >resources. You should take that in to serious consideration when >deciding what applications should do. > >> Ergo: in order to document the input limits, you need to have already >> acquired the resources that you will ever need in order to process the >> limit. > >And may prevent the program from running altogether. If your goal is >to serve as many requests as possible before failure, then is worse >than what I suggested, not better. If there's not enough memory, then >you'll serve 0. I'll serve some number between 0 and all of them. I am confused. you are the one that said that in order to avoid OOM error due to input complexity, all you need to do is to setup upfront limit on allowable input. (since this is what other engineering discipline do) My reply simply highlighted that this is impossible to do correctly unless you pre-acquire all resources you will ever need. Are you now suggesting that you should not set upfront limits?
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-29 23:26 -0700
Re: bad alloc Krice <paulkp@mbnet.fi> - 2011-08-30 02:14 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 06:26 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 14:34 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 06:54 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 15:02 +0100
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 15:06 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:20 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 15:31 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:47 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 15:52 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 08:00 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 16:15 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 10:31 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 18:58 +0100
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 19:18 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 16:17 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-31 00:56 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 17:11 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-31 01:24 +0100
Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-08-31 12:33 +1200
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 18:38 -0700
Re: bad alloc Noah Roberts <roberts.noah@gmail.com> - 2011-08-30 20:07 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 04:04 -0700
Re: bad alloc Noah Roberts <roberts.noah@gmail.com> - 2011-08-31 09:17 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-31 14:59 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 00:50 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 12:41 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 05:00 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 13:59 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 06:35 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 14:50 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 13:51 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 21:58 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 14:05 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 22:08 +0100
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:16 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 04:12 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-02 15:08 +0100
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:07 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 04:15 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 11:21 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 10:46 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 18:58 +0100
Re: bad alloc "Waldek M." <wm@localhost.localdomain> - 2011-08-31 20:58 +0200
Re: bad alloc "io_x" <a@b.c.invalid> - 2011-09-03 10:13 +0200
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:53 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 16:28 -0700
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-01 00:49 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 04:50 -0700
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:17 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 04:21 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-01 16:23 -0700
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:19 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 15:37 -0700
Re: bad alloc Dombo <dombo@disposable.invalid> - 2011-09-04 09:25 +0200
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-01 16:20 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-30 06:54 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:12 -0700
Re: bad alloc Dombo <dombo@disposable.invalid> - 2011-08-30 22:58 +0200
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 15:56 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-08-31 09:28 +0000
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 04:20 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-02 14:57 +0000
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 08:35 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 04:25 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-30 03:26 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 05:54 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 14:30 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:00 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 00:37 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 04:26 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-30 07:03 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:57 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 16:04 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 08:15 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 16:20 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 10:37 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 18:41 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 10:49 -0700
Re: bad alloc Asger-P <junk@asger-p.dk> - 2011-08-31 10:33 +0200
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 04:22 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-30 16:04 -0700
Re: bad alloc Noah Roberts <roberts.noah@gmail.com> - 2011-08-30 20:02 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-30 20:33 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 01:30 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-08-31 09:23 +0000
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 04:21 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 04:47 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 05:35 -0700
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-01 01:08 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 03:56 -0700
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 04:18 -0700
Re: bad alloc Dombo <dombo@disposable.invalid> - 2011-09-03 18:37 +0200
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-03 13:39 -0700
Re: bad alloc red floyd <no.spam.here@its.invalid> - 2011-09-03 13:45 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-03 13:51 -0700
Re: bad alloc Sjouke Burry <burryNULNULFOUR@PPLLAANNEETT.NNLL> - 2011-09-04 00:14 +0200
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 15:51 -0700
Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-09-04 12:15 +1200
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-04 05:00 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:13 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 15:45 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-02 15:40 +0000
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-02 09:33 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 14:06 -0700
Re: bad alloc "io_x" <a@b.c.invalid> - 2011-09-03 10:12 +0200
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 04:21 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 01:22 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 05:18 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 06:36 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 09:33 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-01 00:20 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 04:25 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 12:51 +0100
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 06:04 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-01 06:26 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-01 16:58 -0700
Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 17:25 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 16:02 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:20 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 19:13 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:39 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 17:26 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:35 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 17:28 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 21:01 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 16:14 -0700
Re: bad alloc "io_x" <a@b.c.invalid> - 2011-09-05 10:31 +0200
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:36 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-06 04:09 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:49 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 17:11 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-07 00:24 -0700
Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-08-31 09:59 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 11:24 -0700
Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 16:29 -0700
Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 16:42 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 21:37 -0700
Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-09-02 17:45 +1200
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 16:20 -0700
Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-09-04 12:03 +1200
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-04 10:56 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:50 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-06 00:12 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 03:04 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-07 00:08 -0700
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-07 02:33 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-07 04:28 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-06 13:43 +0000
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-06 07:37 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-07 00:11 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-07 04:29 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-07 05:38 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-07 18:17 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-08 00:45 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 06:58 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-06 09:21 -0700
Re: bad alloc "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-09-07 09:10 +0200
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-07 04:18 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-07 10:34 +0000
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-07 04:00 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-08 12:11 +0000
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-08 06:27 -0700
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:52 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 17:16 -0700
Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-07 02:39 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-07 04:14 -0700
Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-09-06 17:00 +1200
Re: bad alloc Miles Bader <miles@gnu.org> - 2011-09-06 14:51 +0900
Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:55 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:44 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-07 10:20 +0000
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-07 03:40 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-13 17:06 +0000
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-13 12:09 -0700
Re: bad alloc "Paul" <pchristor@yahoo.co.uk> - 2011-09-14 00:18 +0100
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-14 15:11 +0000
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-14 11:17 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-15 04:17 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-15 06:50 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-15 07:31 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-15 07:59 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-16 00:19 -0700
Re: bad alloc Noah Roberts <roberts.noah@gmail.com> - 2011-09-17 10:13 -0700
Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-18 10:07 -0700
Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-16 15:41 +0000
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-16 11:26 -0700
Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-16 15:38 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-17 04:25 -0700
Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 23:17 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-02 04:03 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 04:37 -0700
Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-02 15:15 +0100
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 07:35 -0700
Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-30 16:06 -0700
Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 16:45 -0700
csiph-web