projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ccdff4
)
Don't call GetMemoryUsage every 5 seconds
author
Ryan Dahl
<ry@tinyclouds.org>
Fri, 18 Mar 2011 18:39:44 +0000
(11:39 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Fri, 18 Mar 2011 18:39:44 +0000
(11:39 -0700)
src/node.cc
patch
|
blob
|
history
diff --git
a/src/node.cc
b/src/node.cc
index
11bfd92
..
fa2fab2
100644
(file)
--- a/
src/node.cc
+++ b/
src/node.cc
@@
-1483,9
+1483,10
@@
static void CheckStatus(EV_P_ ev_timer *watcher, int revents) {
assert(revents == EV_TIMEOUT);
// check memory
- size_t rss, vsize;
- if (!ev_is_active(&gc_idle) && Platform::GetMemory(&rss, &vsize) == 0) {
- if (rss > 1024*1024*128) {
+ if (!ev_is_active(&gc_idle)) {
+ HeapStatistics stats;
+ V8::GetHeapStatistics(&stats);
+ if (stats.total_heap_size() > 1024 * 1024 * 128) {
// larger than 128 megs, just start the idle watcher
ev_idle_start(EV_A_ &gc_idle);
return;