0

Is it possible to know how much memory a program will need?

2 Answers 2

2

The usual method is to use some form of profiler. Many IDEs include their own, Netbeans for example has a particularly good profiler (in my opinion) for Java applications. This will show the memory consumption of your program as its running, and is good for testing for things such as memory leaks as well as overall consumption.

If you've only got the binary, then you'll just have to use a basic tool such as task manager or pmap. This won't give you nearly as much detail though.

Sign up to request clarification or add additional context in comments.

Comments

0

if you're using an IDE then it will probably have some in-built feature by which you can see the same...

In case you are executing directly, I guess probably the Task Manager is the best way.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.