[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trunk r113953: * image.c: Shrink memory needed for animation cache.
From: |
Paul Eggert |
Subject: |
Re: trunk r113953: * image.c: Shrink memory needed for animation cache. |
Date: |
Mon, 19 Aug 2013 17:53:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 |
Lars Magne Ingebrigtsen wrote:
> Do we really need to know this? It's a zero-terminated string (in a
> larger block), so just by calling strdup, we're OK, and we don't need
> any magical constants.
Calling strdup would mean we'd be calling malloc twice
instead of once. Insted, we can make the signature a flexible
array member. This is a bit slower than what we had, but it's
better than calling malloc twice and it would insulate us better
if ImageMagick switches to a different digest format.
I did that in trunk bzr 113954.