Skip to content

Commit

Permalink
force gc
Browse files Browse the repository at this point in the history
  • Loading branch information
clowwindy committed Jul 5, 2013
1 parent 20a657a commit c4ca466
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/sslocal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
#!/usr/bin/env node --expose-gc

var path = require('path');
var fs = require('fs');
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');

require(lib + '/shadowsocks/local').main()
require(lib + '/shadowsocks/local').main()
4 changes: 2 additions & 2 deletions bin/ssserver
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
#!/usr/bin/env node --expose-gc

var path = require('path');
var fs = require('fs');
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');

require(lib + '/shadowsocks/server').main()
require(lib + '/shadowsocks/server').main()
7 changes: 7 additions & 0 deletions lib/shadowsocks/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/utils.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,9 @@ exports.warn = (msg)->

exports.error = (msg)->
exports.log exports.ERROR, msg

setInterval(->
if global.gc
exports.debug 'GC'
gc()
, 1000)

0 comments on commit c4ca466

Please sign in to comment.