diff options
| author | Sascha Schumann <sas@php.net> | 2000-03-29 20:37:29 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2000-03-29 20:37:29 +0000 |
| commit | f50de70308ddfa3d8477634318fa059e11f52a30 (patch) | |
| tree | a9773d11acb851aeedf1f30deb2800879a473064 /ext/session/mod_mm.c | |
| parent | af9a852bf1d12a4dfa7cd410fabf47f5edf99bce (diff) | |
| download | php-git-f50de70308ddfa3d8477634318fa059e11f52a30.tar.gz | |
GC now prints out how many session objects were removed
Diffstat (limited to 'ext/session/mod_mm.c')
| -rw-r--r-- | ext/session/mod_mm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c index 3ba73fcc32..8720bec21d 100644 --- a/ext/session/mod_mm.c +++ b/ext/session/mod_mm.c @@ -305,6 +305,7 @@ PS_GC_FUNC(mm) time_t now; ps_sd *sd, *next; + *nrdels = 0; ps_mm_debug("gc\n"); mm_lock(data->mm, MM_LOCK_RW); @@ -315,8 +316,10 @@ PS_GC_FUNC(mm) for (sd = data->hash[h]; sd; sd = next) { next = sd->next; ps_mm_debug("looking at %s\n", sd->key); - if ((now - sd->ctime) > maxlifetime) + if ((now - sd->ctime) > maxlifetime) { ps_sd_destroy(data, sd); + *nrdels++; + } } mm_unlock(data->mm); |
