Browse Source

Test

etomic
jl777 7 years ago
parent
commit
52f6758c4d
  1. 2
      crypto777/bitcoind_RPC.c
  2. 6
      iguana/exchanges/LP_nativeDEX.c

2
crypto777/bitcoind_RPC.c

@ -277,7 +277,7 @@ try_again:
void init_string(struct return_string *s)
{
s->len = 0;
s->len = 511;
s->ptr = (char *)calloc(1,s->len+1);
if ( s->ptr == NULL )
{

6
iguana/exchanges/LP_nativeDEX.c

@ -1221,7 +1221,7 @@ void *LP_realloc(void *ptr,uint64_t len)
void LP_free(void *ptr)
{
static uint32_t lasttime;
static uint32_t lasttime,unknown;
uint32_t now; int32_t n; uint64_t total = 0; struct LP_memory_list *mp,*tmp;
if ( (now= (uint32_t)time(NULL)) > lasttime+6 )
{
@ -1232,7 +1232,7 @@ void LP_free(void *ptr)
total += mp->len;
n++;
}
printf("total %d allocated total %llu\n",n,(long long)total);
printf("total %d allocated total %llu unknown.%u\n",n,(long long)total,unknown);
lasttime = (uint32_t)time(NULL);
}
DL_FOREACH_SAFE(LP_memory_list,mp,tmp)
@ -1249,7 +1249,7 @@ void LP_free(void *ptr)
//printf(">>>>>>>>>>> LP_free ptr.%p mp.%p len.%u\n",ptr,mp,mp->len);
free(mp->ptr);
free(mp);
} // free from source file with #define redirect for alloc that wasnt
} else unknown++; // free from source file with #define redirect for alloc that wasnt
}
char *LP_clonestr(char *str)

Loading…
Cancel
Save