On Mon, Jan 25, 2010, Vinod.Chaudhary wrote: > Hi, > > I want to know the memory usage of CRL file prior to loading ? > > Basically after call to function "d2i_X509_CRL_bio" to load large CRL file, > my free memory goes down drastically. I understand this behavior because > openssl allocate the memory to load CRL. > > I want to understand how this memory is allocated, is it depend on number > of revoked entry into CRL file ? How much memory is allocated per entry ? >
It depends on the size of the CRL, the number of entries, extensions and several other factors. When you call d2i_X509_CRL_bio() it will initially load the whole CRL into a memory BIO and then parse it out using d2i_X509_CRL. That contains many structures associated with each field. I'd have to check my archives but I *think* the parsed out structure is ~3x the CRL size. If you use d2i_X509_CRL_bio() it will temporarily increase to 4x and the PEM routines 5x. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org