From f23642869624c7a748333cac742f46b8c7bc1975 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 2 Mar 2011 13:35:37 -0700 Subject: [PATCH] ... --- src/calibre/utils/mem.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/calibre/utils/mem.py b/src/calibre/utils/mem.py index 930870abd1..c68badc709 100644 --- a/src/calibre/utils/mem.py +++ b/src/calibre/utils/mem.py @@ -5,6 +5,14 @@ __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' +''' +Measure memory usage of the current process. + +The key function is memory() which returns the current memory usage in bytes. +You can pass a number to memory and it will be subtracted from the returned +value. +''' + import gc, os from calibre.constants import iswindows, islinux