[xmlsec] FW: Free/Destroy versus Memory Leak

Edward Shallow ed.shallow at rogers.com
Sun Feb 19 14:35:51 PST 2006


 .. Re-sending ... 1st one bounced ..

-----Original Message-----
From: Edward Shallow [mailto:ed.shallow at rogers.com] 
Sent: February 19, 2006 5:21 PM
To: 'xmlsec at aleksey.com'
Subject: Free/Destroy versus Memory Leak

Hi Aleksey,

   I seem to have all the functionality challenges behind me in this latest
project in which I have put xmlsec behind a Web Server.

Loads of functionality all working flawlessly on Igor's Windows binairies
Version 1.2.8 ... However ...

I am noticing that the process memory continues to grow throughout the day
at roughly 32K - 40K per request. This is even on a Verify with little
happening.

I am allocating the xmlsec environment only once at startup as follows:

- xmlsec.xmlSecInit()
- xmlsec.xmlSecCryptoDLInit()
- xmlsec.xmlSecCryptoDLLoadLibrary('mscrypto')
- xmlsec.xmlSecCryptoAppInit('MY')
- xmlsec.xmlSecCryptoInit()

Everything else is on a request-by-request basis including:

- libxml2 parsed docs
- keysMngr
- keyStore
- dsig context
- enc context

And all are being free'd or Destroyed using:

- libxml2.xmlFreeDoc
- xmlsec.xmlSecDSigCtxDestroy(context)
- xmlsec.xmlSecKeysMngrDestroy(mngr)
- xmlsec.xmlSecKeyStoreDestroy(store)


   I have isolated the memory growth to the xmlsec environment by using
successively narrower 'quick returns'.
When I comment out the single xmlsec.xmlSecDSigCtxVerify(dsigCtx, sigNode)
call, it grows at only 1/10th the rate ~4K (but still grows).

Do you have any ideas or suggestions ?

Cheers,
Ed  





More information about the xmlsec mailing list