Changeset: fb54b0a70ee3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fb54b0a70ee3
Modified Files:
gdk/gdk_utils.c
sql/storage/store.c
Branch: resource_management
Log Message:
small fix
diffs (48 lines):
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -2304,6 +2304,15 @@ ma_close_to(allocator *sa, allocator_sta
if (sa) {
COND_LOCK_ALLOCATOR(sa);
assert(ma_tmp_active(sa));
+ if (sa->tmp_used > 0) {
+ sa->tmp_used -= 1;
+ }
+ // check if we can reset to the initial state
+ if (!ma_tmp_active(sa) && !sa_has_dependencies(sa)) {
+ COND_UNLOCK_ALLOCATOR(sa);
+ ma_reset(sa);
+ return;
+ }
if (state && !sa_has_dependencies(sa)) {
assert((state->nr > 0) && (state->nr <= sa->nr));
assert(state->used <= SA_BLOCK_SIZE);
@@ -2317,9 +2326,6 @@ ma_close_to(allocator *sa, allocator_sta
sa->inuse = state_save.inuse;
}
}
- if (sa->tmp_used > 0) {
- sa->tmp_used -= 1;
- }
COND_UNLOCK_ALLOCATOR(sa);
}
}
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -2234,13 +2234,13 @@ store_init(int debug, store_type store_t
return NULL;
}
- if (!(pa = create_allocator(NULL, NULL, false))) {
+ if (!(pa = create_allocator(NULL, "MA_SQLstore", false))) {
TRC_CRITICAL(SQL_STORE, "Allocation failure while initializing
store\n");
_DELETE(store);
return NULL;
}
- if (!(ta = create_allocator(pa, NULL, false))) {
+ if (!(ta = create_allocator(pa, "TA_SQLstore", false))) {
TRC_CRITICAL(SQL_STORE, "Allocation failure while initializing
store\n");
if (pa)
ma_destroy(pa);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]