Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Apr 2017 12:20:40 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        Kyle Evans <kevans91@ksu.edu>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org,  src-committers <src-committers@freebsd.org>
Subject:   Re: svn commit: r316492 - in head/usr.bin/grep: . regex
Message-ID:  <CAG6CVpUQmvHVSBSopghbz-FL9k=_tEtkP-CLLb46FCSjfrNQWA@mail.gmail.com>
In-Reply-To: <CACNAnaFKsJSPCb0vp6K7hsE-yCaESu--CrGrr4XyX6gDYpMyvA@mail.gmail.com>
References:  <201704041608.v34G8qSo055328@repo.freebsd.org> <4D675D2F-7D6F-4AF2-AE10-5DF19D4158D0@gmail.com> <B9C5AC3B-1775-4D5D-ADA7-C6CE091F32F5@FreeBSD.org> <CACNAnaFKsJSPCb0vp6K7hsE-yCaESu--CrGrr4XyX6gDYpMyvA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 4, 2017 at 12:16 PM, Kyle Evans <kevans91@ksu.edu> wrote:
> On Tue, Apr 4, 2017 at 1:56 PM, Dimitry Andric <dim@freebsd.org> wrote:
>>
>> > Where did xmalloc.c originate from?
>>
>> GNU.  Almost all software from the GNU project relies on malloc wrappers
>> which abort the program on allocation failures.
>
>
> This also explains the grep_* versions of `malloc`, `calloc`, `realloc`, and
> `strdup` that I've developed a slight distaste for. The "xmalloc" flavor
> also had some hash table bits to allow failing after $n allocations -- is
> that a slightly less common GNU-ism?

Aborting-on-failure malloc wrappers didn't begin or end at GNU.  I
don't think bsdgrep's malloc wrappers have anything to do with GNU.
(xmalloc didn't at least; I haven't looked at the grep_malloc stuff).

Best,
Conrad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpUQmvHVSBSopghbz-FL9k=_tEtkP-CLLb46FCSjfrNQWA>