@@ -3287,9 +3287,7 @@ void db_free_term(DbTable *tb, void* basep, Uint offset)
3287
3287
size = db_alloced_size_comp (db );
3288
3288
}
3289
3289
else {
3290
- ErlOffHeap tmp_oh ;
3291
- tmp_oh .first = db -> first_oh ;
3292
- erts_cleanup_offheap (& tmp_oh );
3290
+ erts_cleanup_offheap_list (db -> first_oh );
3293
3291
size = offset + offsetof(DbTerm ,tpl ) + db -> size * sizeof (Eterm );
3294
3292
}
3295
3293
erts_db_free (ERTS_ALC_T_DB_TERM , tb , basep , size );
@@ -3315,9 +3313,7 @@ void db_free_term_no_tab(int compress, void* basep, Uint offset)
3315
3313
size = db_alloced_size_comp (db );
3316
3314
}
3317
3315
else {
3318
- ErlOffHeap tmp_oh ;
3319
- tmp_oh .first = db -> first_oh ;
3320
- erts_cleanup_offheap (& tmp_oh );
3316
+ erts_cleanup_offheap_list (db -> first_oh );
3321
3317
size = offset + offsetof(DbTerm ,tpl ) + db -> size * sizeof (Eterm );
3322
3318
}
3323
3319
erts_db_free (ERTS_ALC_T_DB_TERM , NULL , basep , size );
@@ -3472,9 +3468,7 @@ void* db_store_term(DbTableCommon *tb, DbTerm* old, Uint offset, Eterm obj)
3472
3468
3473
3469
if (old != 0 ) {
3474
3470
basep = ((byte * ) old ) - offset ;
3475
- tmp_offheap .first = old -> first_oh ;
3476
- erts_cleanup_offheap (& tmp_offheap );
3477
- old -> first_oh = tmp_offheap .first ;
3471
+ erts_cleanup_offheap_list (old -> first_oh );
3478
3472
if (size == old -> size ) {
3479
3473
newp = old ;
3480
3474
}
@@ -6024,9 +6018,7 @@ DbTerm* db_alloc_tmp_uncompressed(DbTableCommon* tb, DbTerm* org)
6024
6018
6025
6019
void db_free_tmp_uncompressed (DbTerm * obj )
6026
6020
{
6027
- ErlOffHeap off_heap ;
6028
- off_heap .first = obj -> first_oh ;
6029
- erts_cleanup_offheap (& off_heap );
6021
+ erts_cleanup_offheap_list (obj -> first_oh );
6030
6022
#ifdef DEBUG_CLONE
6031
6023
ASSERT (obj -> debug_clone == NULL );
6032
6024
#endif
0 commit comments