Re: RFC: safer memory allocation APIs with compile time checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 28, 2008 at 03:39:41AM -0400, Daniel Veillard wrote:
>   Calling abort() in a library is a major NO-NO and one of the reasons
> I avoided glib in most of the code I developped. You just can't exit()/abort()
> from a library.

That depends ... If you can override the abort() function with an
error handler, then I'd say it is OK.

Remember that only about 1 in 10 memory allocations in a program use
malloc.  The other 9 use the stack, and effectively call 'abort()' if
they fail with no opportunity to override.

(For me, of course, all this just points to the desperate need to use
proper programming languages for writing critical software ..  In 2008
we shouldn't even be having a discussion about memory management, in
the same way we don't discuss laying out the blocks on the hard disk
any more)

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]