Skip to content

Commit

Permalink
a little optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto@fierobecco committed Jan 11, 2010
1 parent 6a58b5a commit d94c367
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions uwsgi.c
Expand Up @@ -1931,12 +1931,7 @@ void log_request() {
if (uwsgi.memory_debug == 1) {
get_memusage();
#ifndef UNBIT
#ifdef __APPLE__
fprintf(stderr,"{address space usage: %lld bytes/%lluMB} {rss usage: %llu bytes/%lluMB} ", uwsgi.workers[uwsgi.mywid].vsz_size, uwsgi.workers[uwsgi.mywid].vsz_size/1024/1024, uwsgi.workers[uwsgi.mywid].rss_size, uwsgi.workers[uwsgi.mywid].rss_size/1024/1024) ;
#endif
#ifdef __linux__
fprintf(stderr,"{address space usage: %lld bytes/%lluMB} {rss usage: %llu bytes/%lluMB} ", uwsgi.workers[uwsgi.mywid].vsz_size, uwsgi.workers[uwsgi.mywid].vsz_size/1024/1024, uwsgi.workers[uwsgi.mywid].rss_size*PAGE_SIZE, (uwsgi.workers[uwsgi.mywid].rss_size*PAGE_SIZE)/1024/1024) ;
#endif
#else
fprintf(stderr,"{address space usage: %lld bytes/%lluMB} ", uwsgi.workers[uwsgi.mywid].vsz_size, uwsgi.workers[uwsgi.mywid].vsz_size/1024/1024) ;
#endif
Expand Down Expand Up @@ -1978,6 +1973,7 @@ void get_memusage() {
}
fclose(procfile);
}
uwsgi.workers[uwsgi.mywid].rss_size = uwsgi.workers[uwsgi.mywid].rss_size*PAGE_SIZE;
#endif
#ifdef __APPLE__
/* darwin documentation says that the value are in pages, bot they are bytes !!! */
Expand Down

0 comments on commit d94c367

Please sign in to comment.