Changeset: 00dd4f499cd5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=00dd4f499cd5
Modified Files:
MonetDB5/mal/mal_resource.c
Branch: gdk-tracer
Log Message:
Reverted mal_resource.c
diffs (43 lines):
diff --git a/MonetDB5/mal/mal_resource.c b/MonetDB5/mal/mal_resource.c
--- a/MonetDB5/mal/mal_resource.c
+++ b/MonetDB5/mal/mal_resource.c
@@ -129,15 +129,15 @@ MALadmission_claim(Client cntxt, MalBlkP
if ( memorypool > argclaim || stk->workers == 0 ) {
/* If we are low on memory resources, limit the user if he
exceeds his memory budget
* but make sure there is at least one worker thread active */
- // if ( 0 && cntxt->memorylimit) {
- // if (argclaim + stk->memory > (lng) cntxt->memorylimit *
LL_CONSTANT(1048576)){
- // MT_lock_unset(&admissionLock);
- // DEBUG(PAR, "Delayed due to lack of session
memory " LLFMT " requested "LLFMT"\n",
- // stk->memory, argclaim);
- // return -1;
- // }
- // stk->memory += argclaim;
- // }
+ if ( 0 && cntxt->memorylimit) {
+ if (argclaim + stk->memory > (lng) cntxt->memorylimit *
LL_CONSTANT(1048576)){
+ MT_lock_unset(&admissionLock);
+ DEBUG(PAR, "Delayed due to lack of session
memory " LLFMT " requested "LLFMT"\n",
+ stk->memory, argclaim);
+ return -1;
+ }
+ stk->memory += argclaim;
+ }
memorypool -= argclaim;
DEBUG(PAR, "Thread %d pool " LLFMT "claims " LLFMT "\n",
THRgettid(), memorypool, argclaim);
@@ -162,10 +162,10 @@ MALadmission_release(Client cntxt, MalBl
MT_lock_set(&admissionLock);
(void) cntxt;
- // if ( 0 && cntxt->memorylimit) {
- // DEBUG(PAR, "Return memory to session budget " LLFMT "\n",
stk->memory);
- // stk->memory -= argclaim;
- // }
+ if ( 0 && cntxt->memorylimit) {
+ DEBUG(PAR, "Return memory to session budget " LLFMT "\n",
stk->memory);
+ stk->memory -= argclaim;
+ }
memorypool += argclaim;
if ( memorypool > (lng) MEMORY_THRESHOLD ){
DEBUG(PAR, "Memorypool reset\n");
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list