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)
{
struct LP_memory_list *mp = ptr;
--mp;
mp = realloc(mp,len + sizeof(*mp));
mp->timestamp = (uint32_t)time(NULL);
mp->len = (uint32_t)len;
return(&mp[1]);
if ( mp != 0 )
{
--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->timestamp = (uint32_t)time(NULL);
mp->len = (uint32_t)len;
return(&mp[1]);
} else return(LP_alloc(len));
}
void LP_free(void *ptr)

Loading…
Cancel
Save