Last active
August 29, 2015 14:06
-
-
Save arajkumar/fa9b3836630aeaed1361 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// interface | |
namespace blaze { | |
class ProcessStatusProvider { | |
class Status { | |
pid_t pid_; | |
size_t private_mem_; | |
size_t shared_mem_; | |
size_t gpu_mem_; | |
bool is_extended; | |
// refer below properties only if is_extended == true; | |
size_t js_heap_; | |
size_t image_cache_; | |
size_t css_cache_; | |
}; | |
typedef boost::function<void(const std::map<pid_t, Status>&)> StatusCallback; | |
static void GetCurrentStatus(const StatusCallback& callback, bool extended = false); | |
}; | |
} | |
// usage | |
void GetCurrentStatusCallback(const std::map<pid_t, Status>& status) { | |
// | |
} | |
blaze::ProcessStatusProvider::GetCurrentStatus(boost::bind(GetCurrentStatusCallback)); | |
blaze::ProcessStatusProvider::GetCurrentStatus(boost::bind(GetCurrentStatusCallback), true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment