From 77ffa9bfaa3b64cce3abaefc7fe79da8617cea1c Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 16 Nov 2017 18:22:41 +0200 Subject: [PATCH] Test --- crypto777/cJSON.c | 4 ++-- iguana/exchanges/LP_nativeDEX.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crypto777/cJSON.c b/crypto777/cJSON.c index 901e6fc98..54df964f5 100755 --- a/crypto777/cJSON.c +++ b/crypto777/cJSON.c @@ -56,8 +56,8 @@ static int32_t cJSON_strcasecmp(const char *s1,const char *s2) void *LP_alloc(uint64_t len); void LP_free(void *ptr); -static void *(*cJSON_malloc)(size_t sz) = (void *)LP_alloc; -static void (*cJSON_free)(void *ptr) = LP_free; +static void *(*cJSON_malloc)(size_t sz) = (void *)malloc;//LP_alloc; +static void (*cJSON_free)(void *ptr) = free;//LP_free; static void *cJSON_mallocstr(int32_t len) { diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 30e1d9753..f73c9474f 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1043,7 +1043,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu printf("error launching LP_reserved_msgs for (%s)\n",myipaddr); exit(-1); } - if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)utxosQ_loop,(void *)myipaddr) != 0 ) + if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)utxosQ_loop,(void *)myipaddr) != 0 ) { printf("error launching utxosQ_loop for (%s)\n",myipaddr); exit(-1); @@ -1216,7 +1216,7 @@ int32_t zeroval() { return(0); } void *LP_alloc(uint64_t len) { -return(calloc(1,len)); +//return(calloc(1,len)); LP_cjson_allocated += len; LP_cjson_total += len; LP_cjson_count++; @@ -1235,7 +1235,7 @@ return(calloc(1,len)); void LP_free(void *ptr) { static uint32_t lasttime,unknown; static int64_t lasttotal; -free(ptr); return; +//free(ptr); return; uint32_t now; char str[65]; int32_t n,lagging; uint64_t total = 0; struct LP_memory_list *mp,*tmp; if ( (now= (uint32_t)time(NULL)) > lasttime+1 ) {