[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140407111229.GA24665@bolet.org>
Date: Mon, 7 Apr 2014 13:12:29 +0200
From: Thomas Pornin <pornin@...et.org>
To: discussions@...sword-hashing.net
Subject: Re: [PHC] Re: Yarn issues
On Mon, Apr 07, 2014 at 02:58:42AM -0400, Bill Cox wrote:
> when mallocing main memory, you malloc(16 << m_cost), and I think it
> should have been malloc(16ULL << m_cost)
Just my opinon, but it should be: malloc((size_t)16 << m_cost)
The size_t type is the correct type for the size of things in memory:
it is what sizeof returns, and malloc() expects. That way, you will
have a value of the appropriate type, without forcing a conversion.
--Thomas Pornin
Powered by blists - more mailing lists