Re: [PATCH v2 15/19] tools/xenstore: switch hashtable to use the talloc framework

2023-01-11 Thread Julien Grall
Hi, On 11/01/2023 09:27, Juergen Gross wrote: On 20.12.22 22:50, Julien Grall wrote: Hi Juergen, On 13/12/2022 16:00, Juergen Gross wrote: @@ -115,47 +117,32 @@ hashtable_expand(struct hashtable *h)   if (h->primeindex == (prime_table_length - 1)) return 0;   newsize = primes[++(h->pr

Re: [PATCH v2 15/19] tools/xenstore: switch hashtable to use the talloc framework

2023-01-11 Thread Juergen Gross
On 20.12.22 22:50, Julien Grall wrote: Hi Juergen, On 13/12/2022 16:00, Juergen Gross wrote: @@ -115,47 +117,32 @@ hashtable_expand(struct hashtable *h)   if (h->primeindex == (prime_table_length - 1)) return 0;   newsize = primes[++(h->primeindex)]; -    newtable = (struct entry **)cal

Re: [PATCH v2 15/19] tools/xenstore: switch hashtable to use the talloc framework

2022-12-20 Thread Julien Grall
Hi Juergen, On 13/12/2022 16:00, Juergen Gross wrote: @@ -115,47 +117,32 @@ hashtable_expand(struct hashtable *h) if (h->primeindex == (prime_table_length - 1)) return 0; newsize = primes[++(h->primeindex)]; -newtable = (struct entry **)calloc(newsize, sizeof(struct entry*));

[PATCH v2 15/19] tools/xenstore: switch hashtable to use the talloc framework

2022-12-13 Thread Juergen Gross
Instead of using malloc() and friends, let the hashtable implementation use the talloc framework. This is more consistent with the rest of xenstored and it allows to track memory usage via "xenstore-control memreport". Signed-off-by: Juergen Gross --- tools/xenstore/hashtable.c| 86