Changeset: b47e84bc0070 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b47e84bc0070 Modified Files: gdk/gdk_bbp.c Branch: Dec2023 Log Message:
Reduce number of atomic instructions. diffs (22 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -1666,7 +1666,8 @@ BBPjson_upgrade(json_storage_conversion bat bid; BAT *b; int JSON_type = ATOMindex("json"); - bat *upd = GDKmalloc(sizeof(bat) * (size_t) ATOMIC_GET(&BBPsize)); + bat nbat = (bat) ATOMIC_GET(&BBPsize); + bat *upd = GDKmalloc(sizeof(bat) * (size_t) nbat); int nupd = 0; if (upd == NULL) { @@ -1677,7 +1678,7 @@ BBPjson_upgrade(json_storage_conversion BBPlock(); - for (bid = 1; bid < (bat) ATOMIC_GET(&BBPsize); bid++) { + for (bid = 1; bid < nbat; bid++) { if ((b = BBP_desc(bid)) == NULL) { /* not a valid BAT */ continue; _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org