Interview Question


Country: United States




Comment hidden because of low score. Click to expand.
0
of 0 vote

The problem is heap gets filled with unreferenced objects probably native resource which could not be preempted causing out of memory. In a long run this might crash OS and require restart:-)

- siva October 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

From the question If I understood correctly, the memory will never be exhausted. May be he is expecting something else.

- Anonymous October 17, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Yes..I dont care about of out of memory because I have enough of it..so is there any reason except this, memory leak should be taken care??

- Alex October 17, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Perhaps there is an issue with not being able to maintain an accurate reference count, and therefore not being able to update/write to memory or release a resource because of an inflated reference count?

- Anonymous October 17, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

May be we have enough memory but in case of memory leaks you may not get a big continuous chunk of memory that is required for an object.

- Mario October 17, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

It is always advisable to make a program leak free.
In my POV, If your application is a system service that run's as long as the system is ON, then memory leaks should definitely be handled. If it is a light weight (non-resource hunger) desktop application then not fixing memory leaks is acceptable.

- ashwin kumar December 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

This would exhaust virtual memory of the process while there could be infinite physical memory, eventually crashing as a result of running out of virtual memory.

- Aditya December 08, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Suppose your solution has memory leaks and when the entire memory is exhausted then your solution will Hang/Freeze. This is the problem with memory leak. Also there can be performance issue with your solution.

- Bharath Kumar Amarnath February 07, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Memory leaks could cause more frequent page faults thus resulting in degraded performance

- simpleman February 26, 2013 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More