mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
import works
This commit is contained in:
parent
78c49af6c3
commit
c8bb57d05d
33 changed files with 1404 additions and 141 deletions
|
@ -101,6 +101,7 @@ static unsigned memtbl_size; /* number of allocated entries */
|
|||
static unsigned memtbl_len; /* number of used entries */
|
||||
static struct memtbl_entry *memtbl_unused;/* to keep track of unused entries */
|
||||
|
||||
static void dump_table_at_exit(void);
|
||||
static void dump_table(void);
|
||||
static void check_allmem( const char *info );
|
||||
|
||||
|
@ -135,8 +136,7 @@ add_entry( byte *p, unsigned n, int mode, const char *info, const char *by )
|
|||
membug("memory debug table malloc failed\n");
|
||||
index = 0;
|
||||
memtbl_len = 1;
|
||||
if( DBG_MEMSTAT )
|
||||
atexit( dump_table );
|
||||
atexit( dump_table_at_exit );
|
||||
}
|
||||
else { /* realloc */
|
||||
unsigned n = memtbl_size / 4; /* enlarge by 25% */
|
||||
|
@ -264,6 +264,14 @@ dump_entry(struct memtbl_entry *e )
|
|||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dump_table_at_exit( void)
|
||||
{
|
||||
if( DBG_MEMSTAT )
|
||||
dump_table();
|
||||
}
|
||||
|
||||
static void
|
||||
dump_table( void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue