RE: C++ pushback




The C++ standard does not allow an allocator to return NULL, it is
supposed to raise an exception.

Jan

It is not that unusual for C++ projects to use no exceptions at all. They
simply replace the default standardized allocators with their own. These
allocators can do whatever you want when memory runs out, including waiting
until more memory is available while acting to reduce memory usage in other
parts of the program.

You are not forced to use exceptions if you don't want to. Personally, I
don't like them, and I rarely use them, even in large C++ projects (hundreds
of thousands of lines).

DS


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: xmalloc string functions
    ... a bit over three quarters of the memory, Lotus Notes, another email ... I have good reasons for using multiple email clients ... propagating the error conditions back to the caller. ... event processing against oom exceptions either. ...
    (comp.lang.c)
  • Re: Address Verification
    ... called correctly is only w/in the memory manager itself. ... not loaded in RAM (i.e P bit of its corresponding entry in the page ... MmIsAddressValid() returns FALSE straight away. ... but this throws exceptions on ...
    (microsoft.public.development.device.drivers)
  • Re: Address Verification
    ... i discussed this w/the owner of the memory manager. ... not loaded in RAM (i.e P bit of its corresponding entry in the page ... MmIsAddressValid() returns FALSE straight away. ... but this throws exceptions on ...
    (microsoft.public.development.device.drivers)
  • Re: Handling Out Of Memory
    ... > will keep working if virtual memory is enabled and disk is full. ... > windows crash and burn: turn off virtual memory, ... fucking exceptions. ...
    (alt.comp.lang.borland-delphi)
  • Re: Why We Use C Than C++...
    ... where the compiler describes in detail each ... This method is fast when not throwing exceptions since there ... On a typical virtual memory system, executables are not loaded into memory, ...
    (comp.lang.c)