Jump to content
John Kouraklis

Memory used by a procedure?

Recommended Posts

I need to write some benchmark tests (nothing sophisticated and highly accurate; just to get an idea of what is happening)

 

 

So, I have a project with several procedures and they are all called in sequence. I can measure the time required but I'd also like to have the used memory by each test.

 

I know how to get the used memory for a process (.exe file) but how do I handle a procedure?

 

Then, I thought to create separate small projects with one manager project which will keep track of all these but I wonder if it can be done in one project

 

Thanks 

 

Share this post


Link to post
1 hour ago, John Kouraklis said:

I know how to get the used memory for a process (.exe file) but how do I handle a procedure?

If the procedures works sequential, set flags while entering and leaving the procedure and ask the MemoryManager from a TThread how many memory is currently used.

 

  • Like 2

Share this post


Link to post

I believe CodeSite can log memory at any point but I’ve not tried it to see whether it’s suitable 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×