bitset: Add a bitset_free() function
This commit is contained in:
@@ -141,6 +141,12 @@ static inline struct bitset_mapping* bitset_alloc(
|
||||
return bitset;
|
||||
}
|
||||
|
||||
static inline void bitset_free( struct bitset_mapping * set )
|
||||
{
|
||||
/* TODO: free our mutex... */
|
||||
free( set );
|
||||
}
|
||||
|
||||
#define INT_FIRST_AND_LAST \
|
||||
uint64_t first = from/set->resolution, \
|
||||
last = ((from+len)-1)/set->resolution, \
|
||||
|
@@ -206,7 +206,7 @@ void mirror_destroy( struct mirror *mirror )
|
||||
self_pipe_destroy( mirror->abandon_signal );
|
||||
free(mirror->connect_to);
|
||||
free(mirror->connect_from);
|
||||
free(mirror->dirty_map);
|
||||
bitset_free( mirror->dirty_map );
|
||||
free(mirror);
|
||||
}
|
||||
|
||||
|
@@ -830,7 +830,7 @@ void serve_cleanup(struct server* params,
|
||||
pthread_cancel(params->allocation_map_builder_thread);
|
||||
pthread_join(params->allocation_map_builder_thread, &status);
|
||||
if (params->allocation_map) {
|
||||
free(params->allocation_map);
|
||||
bitset_free( params->allocation_map );
|
||||
}
|
||||
|
||||
int need_mirror_lock;
|
||||
|
Reference in New Issue
Block a user