Skip to content

Instantly share code, notes, and snippets.

@jaylevitt
Created March 31, 2012 05:08
Show Gist options
  • Save jaylevitt/2259544 to your computer and use it in GitHub Desktop.
Save jaylevitt/2259544 to your computer and use it in GitHub Desktop.
mc$prepare_cache_copy: procedure (compname, slot, code);
declare compname char(32)var;
declare slot bin(15);
declare code bin(15);
if (^ mc$manager_lock_slot (compname, LOCK$EXCLUSIVE)) then
return;
mc$current_slot.flags.requested = TRUE;
slot = mc$current_slot_n;
code = 0;
if (^ mc$current_request.flags.compress) then
do;
call mc$quick_unlock_mailbox;
return;
end;
call mbox$compress (code);
if (code ^= 0) then
do;
call mc$quick_unlock_mailbox;
call trace_msg ('Heap compress failed on ' || compname);
return;
end;
mcx$meters.compresses = mcx$meters.compresses + 1;
mc$current_slot.flags.modified = TRUE;
call mc$quick_unlock_mailbox;
end mc$prepare_cache_copy;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment