C++ class that allows you to control your application memory and CPU consumption