Bloomberg LP Interview Question for Financial Software Developers






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

There is a neat way to make sure there are no memory leak.

http://www.flipcode.com/archives/How_To_Find_Memory_Leaks.shtml


Basically, you overload NEW and DELETE, so that every time NEW is called, you make a note of the variable name in your own allocation list. And every time DELETE is called, you remove the count. Therefore, at the end of the program, anything left in the list means a leak.

- TimeVision December 01, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

when an app runs and completes, the memory consumed should be constant. if not then its mem leak. valgrind is nice tool to detect it.

- abhi August 29, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I dont agree with hmmm and I don't know whether memory consumed should be constant or not... but valgrind and purify are the tools used to check for memory leaks.

- Adit.... October 25, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Memory leaks occur when an initialized memory is not freed. e.g.
ptr=malloc
ptr=calloc fails

now ptr does nt points anywhere...so a mem leak

- Don November 19, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I partially agree with abhi...
memory may or may not be same after app completes.
But if the memory leak is high..then may be this procedure ll work out..

As per hmm application crashes...
But i dont think application ll crash easily if memory leak is very little & i ve a huge chuck of memory.....
Coz we saw in our application some times our system crashes in the field after a week coz of memory leak...
So better to use valgrind / purify....

- sr.panigrahi October 13, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

If an application terminates or crashes, all its allocated memory will be collected by the OS. Basically, OS will have the whole virtual page table that the application owned and, eventually release all the pages accordingly. So memory leak occurs only when the memory leaking program is still alive.

- Anonymous November 02, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

A memory leak is a particular type of memory consumption by a computer program where the program is unable to release memory it has acquired.

A memory leak can diminish the performance of the computer by reducing the amount of available memory. Eventually, in the worst case, too much of the available memory may become allocated and all or part of the system or device stops working correctly, the application fails, or the system slows down unacceptably due to thrashing.

- Nick April 04, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.


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