[Kst] extragear/graphics/kst/src/libkstmath
George Staikos
staikos at kde.org
Tue Jul 11 23:57:55 CEST 2006
On Monday 10 July 2006 13:35, Duncan Hanson wrote:
> thanks for the explanation barth.
>
> devel-docs/codingstyle.txt forbids us from using c++ exceptions- how
> should we check for allocing errors?
In general you don't need to. Even if you catch memory errors, in most
cases you cannot safely recover without crashing. Linux also generally lies
and tells you you can allocate memory even when it's not available. The only
case that will regularly fail is very large allocations in tight memory
conditions. In this case, we have KST::malloc() and friends. I don't think
they need to be used anywhere though. If we can malloc when we read the
data, we'll be able to malloc later. That's the only place that should be
concerned with checking failures. Even then, it doesn't really work which is
why we have a heuristic to guess if we should fail or not.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst
mailing list