Scott Frazor wrote:
> 
> Can anyone see why this loop would chew up 8K of memory for each pass?  All
> I need to do is calculate a set of BIgNum primes.
> 
>   A:=f_BN_NEW;
>   B:=f_BN_NEW;
>   C:=f_BN_NEW;
>   BN_CTX:=f_BN_CTX_new;
> 
>   while true do
>    begin
>       temp:=f_BN_bn2dec(A);
>       i:=Length(temp);
>       if f_BN_IS_PRIME(A,i,nil,BN_CTX,nil) = 1 then
>        begin
>         temp:=f_BN_bn2dec(A);
>        end;
>       f_BN_sub(A,A,B); //count backwards by odd numbers
>       application.ProcessMessages;
>   end;
> 

Are you freeing up the buffer returned by BN_bn2dec?

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Gemplus: http://www.gemplus.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to