tech-userlevel archive

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

Re: crypt_r()?

> Given that malloc will cache any reasonable small allocation anyway,
> we are talking about a few dozen or 100 cpu cycles for an operation
> that is expected to take several orders of magnitude more.

I wouldn't be concerned about CPU time costs, no.  I'm more concerned
about malloc _failing_.

Given what you said in another message about password hashing being a
deliberate(!) memory hog, it probably doesn't matter much in practice,
in most cases.  But I would still dislike an API that requires it;
replacing a hashing algorithm for non-"most" cases is a lot easier than
replacing the API.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index