Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • c7b1687
  • /
  • doc
  • /
  • memory.doc
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:b9aa33ace0b431e641b75f14b79cc30d9cdb9cd2
directory badge Iframe embedding
swh:1:dir:7fb1b40fac800276b83cf2e67cdda4b7cd930197
memory.doc
In the interests of debugging SSLeay, there is an option to compile
using some simple memory leak checking.

All malloc(), free() and realloc() calls in SSLeay now go via
Malloc(), Free() and Realloc() (except those in crypto/lhash).

If CRYPTO_MDEBUG is defined, these calls are #defined to
CRYPTO_malloc(), CRYPTO_free() and CRYPTO_realloc().
If it is not defined, they are #defined to malloc(), free() and realloc().

the CRYPTO_malloc() routines by default just call the underlying library
functons.

If CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON) is called, memory leak detection is
turned on.  CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF) turns it off.

When turned on, each Malloc() or Realloc() call is recored along with the file
and line number from where the call was made.   (This is done using the
lhash library which always uses normal system malloc(3) routines).

void CRYPTO_mem_leaks(BIO *b);
void CRYPTO_mem_leaks_fp(FILE *fp);
These both print out the list of memory that has not been free()ed.
This will probably be rather hard to read, but if you look for the 'top level'
structure allocation, this will often give an idea as to what is not being
free()ed.  I don't expect people to use this stuff normally.

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top