1- /* auto-generated on Fri Aug 30 19:43:10 EDT 2019 . Do not edit! */
1+ /* auto-generated on Mon 17 Feb 2020 14:42:17 EST . Do not edit! */
22#include "roaring.h"
33
44/* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */
@@ -643,8 +643,8 @@ int32_t difference_vector16(const uint16_t *__restrict__ A, size_t s_a,
643643 }
644644 if (i_a < s_a ) {
645645 if (C == A ) {
646- assert (count <= i_a );
647- if (count < i_a ) {
646+ assert (( size_t ) count <= i_a );
647+ if (( size_t ) count < i_a ) {
648648 memmove (C + count , A + i_a , sizeof (uint16_t ) * (s_a - i_a ));
649649 }
650650 } else {
@@ -4462,7 +4462,8 @@ run_container_t *run_container_from_array(const array_container_t *c) {
44624462/**
44634463 * Convert the runcontainer to either a Bitmap or an Array Container, depending
44644464 * on the cardinality. Frees the container.
4465- * Allocates and returns new container, which caller is responsible for freeing
4465+ * Allocates and returns new container, which caller is responsible for freeing.
4466+ * It does not free the run container.
44664467 */
44674468
44684469void * convert_to_bitset_or_array_container (run_container_t * r , int32_t card ,
@@ -4480,7 +4481,7 @@ void *convert_to_bitset_or_array_container(run_container_t *r, int32_t card,
44804481 }
44814482 assert (card == answer -> cardinality );
44824483 * resulttype = ARRAY_CONTAINER_TYPE_CODE ;
4483- run_container_free (r );
4484+ // run_container_free(r);
44844485 return answer ;
44854486 }
44864487 bitset_container_t * answer = bitset_container_create ();
@@ -4490,7 +4491,7 @@ void *convert_to_bitset_or_array_container(run_container_t *r, int32_t card,
44904491 }
44914492 answer -> cardinality = card ;
44924493 * resulttype = BITSET_CONTAINER_TYPE_CODE ;
4493- run_container_free (r );
4494+ // run_container_free(r);
44944495 return answer ;
44954496}
44964497
@@ -8837,14 +8838,15 @@ bool roaring_bitmap_remove_run_compression(roaring_bitmap_t *r) {
88378838 int32_t card = run_container_cardinality (truec );
88388839 void * c1 = convert_to_bitset_or_array_container (
88398840 truec , card , & typecode_after );
8840- shared_container_free ((shared_container_t * )c );
8841+ shared_container_free ((shared_container_t * )c );// will free the run container as needed
88418842 ra_set_container_at_index (& r -> high_low_container , i , c1 ,
88428843 typecode_after );
88438844
88448845 } else {
88458846 int32_t card = run_container_cardinality ((run_container_t * )c );
88468847 void * c1 = convert_to_bitset_or_array_container (
88478848 (run_container_t * )c , card , & typecode_after );
8849+ run_container_free ((run_container_t * )c );
88488850 ra_set_container_at_index (& r -> high_low_container , i , c1 ,
88498851 typecode_after );
88508852 }
@@ -10468,6 +10470,7 @@ roaring_bitmap_frozen_view(const char *buf, size_t length) {
1046810470 break ;
1046910471 }
1047010472 default :
10473+ free (arena );
1047110474 return NULL ;
1047210475 }
1047310476 }
0 commit comments