public synchronized void take ( long bytes ) throws ScriptLimitException { if ( limit > 0 ) { memory -= bytes ; if ( memory < 0 ) throw new ScriptLimitException ( ScriptLimitException . Limits . MEMORY , limit ) ; } }
Takes some bytes from heap