Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

How to calculate used shared memory in slab? (no replies)

$
0
0
Hello, I'm the developer of Nchan (previously known as the http push
module) -- https://github.com/slact/nchan. I'm writing a stub_status -
like stats output handler, and I want to output the amount of shared
memory actually used. I could keep track of the raw bytes allocated with
wrappers to ngx_slab_alloc, but that does not produce accurate numbers
because the slab allocator works on pages.

I'm having some trouble understanding the internal working of the slab
allocator. Is there a straightforward way to get the number of pages
currently in use?


Thanks,
Leo

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>