Browse Source

Test

etomic
jl777 7 years ago
parent
commit
b6366f824c
  1. 14
      iguana/exchanges/LP_nativeDEX.c

14
iguana/exchanges/LP_nativeDEX.c

@ -1215,11 +1215,15 @@ void *LP_alloc(uint64_t len)
void *LP_realloc(void *ptr,uint64_t len) void *LP_realloc(void *ptr,uint64_t len)
{ {
struct LP_memory_list *mp = ptr; struct LP_memory_list *mp = ptr;
--mp; if ( mp != 0 )
mp = realloc(mp,len + sizeof(*mp)); {
mp->timestamp = (uint32_t)time(NULL); --mp;
mp->len = (uint32_t)len; printf("\n>>>>>>>>>>> LP_realloc mp.%p ptr.%p len.%llu\n",mp,&mp[1],(long long)len);
return(&mp[1]); mp = realloc(mp,len + sizeof(*mp));
mp->timestamp = (uint32_t)time(NULL);
mp->len = (uint32_t)len;
return(&mp[1]);
} else return(LP_alloc(len));
} }
void LP_free(void *ptr) void LP_free(void *ptr)

Loading…
Cancel
Save