From 2fe9584e526296c37a59308dd41d1180aa02b5e4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 15 Nov 2017 22:35:45 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 10 +++++----- iguana/exchanges/LP_utxo.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index ef97d7d4d..0828a393a 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1201,7 +1201,7 @@ void *LP_alloc(uint64_t len) { struct LP_memory_list *mp; mp = calloc(1,sizeof(*mp) + len); - printf("mp.%p ptr.%p\n",mp,&mp[1]); + printf("\n>>>>>>>>>>> LP_alloc mp.%p ptr.%p len.%llu\n",mp,&mp[1],(long long)len); mp->timestamp = (uint32_t)time(NULL); mp->len = (uint32_t)len; portable_mutex_lock(&LP_cJSONmutex); @@ -1213,9 +1213,9 @@ void *LP_alloc(uint64_t len) void LP_free(void *ptr) { static uint32_t lasttime; - uint32_t now; int32_t n; uint64_t total = 0; char str[65]; struct LP_memory_list *mp,*tmp,*freemp = ptr; + uint32_t now; int32_t n; uint64_t total = 0; struct LP_memory_list *mp,*tmp,*freemp = ptr; --freemp; - printf("freemp.%p\n",freemp); + printf("\n>>>>>>>>>>> LP_free freemp.%p\n",freemp); if ( (now= (uint32_t)time(NULL)) > lasttime+6 ) { n = 0; @@ -1224,15 +1224,15 @@ void LP_free(void *ptr) total += mp->len; n++; } - printf("total %d allocated total size %s\n",n,mbstr(str,total)); + printf("total %d allocated total %llu\n",n,(long long)total); lasttime = (uint32_t)time(NULL); } if ( freemp != 0 ) { portable_mutex_lock(&LP_cJSONmutex); DL_DELETE(LP_memory_list,freemp); - free(freemp); portable_mutex_unlock(&LP_cJSONmutex); + free(freemp); } //else printf("cJSON_unregister of unknown %p %u\n",item,item->cjsonid); } diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index da6f97cc1..fcd05feb3 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/iguana/exchanges/LP_utxo.c @@ -27,7 +27,7 @@ struct LP_inuse_info } LP_inuse[1024]; int32_t LP_numinuse; -struct cJSON_list +/*struct cJSON_list { struct cJSON_list *next,*prev; cJSON *item; @@ -92,7 +92,7 @@ void cJSON_unregister(cJSON *item) free(ptr); portable_mutex_unlock(&LP_cJSONmutex); } //else printf("cJSON_unregister of unknown %p %u\n",item,item->cjsonid); -} +}*/ struct LP_inuse_info *_LP_inuse_find(bits256 txid,int32_t vout) {