bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] Reorganization


From: Jim Meyering
Subject: Re: [Bug-gnulib] Reorganization
Date: Fri, 30 Jan 2004 11:06:43 +0100

Simon Josefsson <address@hidden> wrote:
> My main example is the xalloc module, which depend on error,
> unlocked-io, extensions, exitfail, inline, gettext and other stuff,
> which brings in a considerable amount of code for something that
> ideally should be a simple wrapper around malloc and friends.
>
> Since I use the code in a library used by server processes, the
> printed error message will rarely be seen even in the remote cases
> when an out of memory condition do occur, so I don't consider it that
> important, but even so I replaced:
>
>   error (exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
>
> with[1]
>
>   errno = ENOMEM;
>   perror (PACKAGE);

If that's the only problem then can you set xalloc_fail_func
to a function that does the above and then calls abort?

But maybe it's something deeper.
I'm not sure I'd want a server aborting, even if it fails to allocate
some memory.  The gnulib x* functions were not designed for use in server
applications.  Maybe you need specialized versions of those functions.

> which for my uses is about as flexible, and remove most of the
> problematic dependencies.  It might even be better internationalized
> because I believe the errno errors are widely translated, whereas the
> xalloc_msg_memory_exhausted string must be translated manually in
> every package that uses xalloc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]