JuanPablo
JuanPablo

Reputation: 24754

Determine memory consumption

In C++, with this:

std::time_t first  = time(NULL);
/* .. code .. */
std::time_t second = time(NULL);

std::cout << "Seg : " << difftime(second,first) << std::endl; 

I can determine my program's execution duration.

Can I determine its memory consumption at different points through the program?

Upvotes: 1

Views: 194

Answers (1)

Lightness Races in Orbit
Lightness Races in Orbit

Reputation: 385108

Not easily.

Upvotes: 2

Related Questions