Browse Source

Test

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

4
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;
if ( mp != 0 )
{
--mp; --mp;
printf("\n>>>>>>>>>>> LP_realloc mp.%p ptr.%p len.%llu\n",mp,&mp[1],(long long)len);
mp = realloc(mp,len + sizeof(*mp)); mp = realloc(mp,len + sizeof(*mp));
mp->timestamp = (uint32_t)time(NULL); mp->timestamp = (uint32_t)time(NULL);
mp->len = (uint32_t)len; mp->len = (uint32_t)len;
return(&mp[1]); return(&mp[1]);
} else return(LP_alloc(len));
} }
void LP_free(void *ptr) void LP_free(void *ptr)

Loading…
Cancel
Save