Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Tue, 2012-02-28 at 14:48 +0100, Lubos Lunak wrote:
- with today's systems (overcommitting, etc.) it is rather pointless to guard 
against allocation failures

Another scenario of possibly more usefulness than actually "running out
of memory" is being directed to allocate a lunatic string size by some
busted document during import which is physically impossible to allocate
on a given architecture e.g. a broken .doc or whatever which claims to
have strings of SAL_MAX_SIZE * sal_Unicodes. Those would currently throw
std::bad_alloc without going anywhere near actually attempting to
allocate memory.

 Does somebody see a good reason not to just remove it?

Mine's a somewhat contrived scenario, probably better to use custom foo
in places like the filters where the whole import can be abandoned on
epic failure.

C.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.