It is certainly possible to do this in some particular lisps, but it may not be possible to do this in EVERY lisp, and certainly not using the same code in each lisp. But you are asking for the wrong thing, in my opinion. Why not run_with_limits( ----ANY maxima command---, time_limit=..., memory_limit= ...., .....)