Re: Extremely poor performance crunching random numbers under PIV-FC5

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


On Fri, 2006-05-19 at 10:20 -0400, Jakub Jelinek wrote:
> On Fri, May 19, 2006 at 04:16:40PM +0200, BankHacker wrote:
> > Jakub, I have tried to do what you propose but the following code is
> > throwing an error in execution time:
> > 		memset(randomdataState, 0, sizeof(*randomdataState));
> And you dereference the uninitialized pointer here ^^^.

Umm, just to be pedantic, sizeof will happily return
the number of bytes required to store 'struct random_data'.  It doesn't
need to dereference anything.  eg. "sizeof(struct random_data)"

The problem is with:

> random_r(randomdataState, &nRandom);

in which random_r() uses (and dereferences) the uninitialized

Matt Davey        There are two theories to arguing with women. 
[email protected] 	Neither one works. 

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux