Click here to Skip to main content
15,908,673 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Anyone use CppCheck ? Enum 'MyEnum' hides typedef with same name... Pin
David Crow26-Aug-10 3:55
David Crow26-Aug-10 3:55 
AnswerRe: Anyone use CppCheck ? Enum 'MyEnum' hides typedef with same name... Pin
Maximilien26-Aug-10 4:20
Maximilien26-Aug-10 4:20 
QuestionChecking connection Status Pin
ShibuKizhepat26-Aug-10 0:23
ShibuKizhepat26-Aug-10 0:23 
AnswerRe: Checking connection Status PinPopular
Moak26-Aug-10 1:02
Moak26-Aug-10 1:02 
QuestionIdentifying Memory leak location Pin
ganesh.dp26-Aug-10 0:01
ganesh.dp26-Aug-10 0:01 
AnswerRe: Identifying Memory leak location Pin
Aescleal26-Aug-10 0:16
Aescleal26-Aug-10 0:16 
GeneralRe: Identifying Memory leak location Pin
ganesh.dp26-Aug-10 0:27
ganesh.dp26-Aug-10 0:27 
AnswerRe: Identifying Memory leak location Pin
Niklas L26-Aug-10 0:41
Niklas L26-Aug-10 0:41 
There are some other hints in there as well. The compiler makes sure allocated memory is filled with the value 0xCD for debug builds. That way the debugger can warn the user if you're trying to read uninitialized data.

As you can see, both leaks of size 1024, seem to be unused. Also 1024 is a neat number, and I bet you could just search in your source code for '1024'. Someone is probably allocating a buffer they think is big enough for a task.

You can also see the 'CD' pattern in the other dumps, indicating how the original layout might be. Assuming you have not altered the packing, it looks like the first 36 byte leak comes from a class or struct. The reason being the 3 CD in the middle. The struct might look something like
struct (or class)
{
    int n;
    char c;
    ...
};
where the n is 26691400 in this case. Does that number fit in somewhere? Like a database table index or similar?

There are a lot of hints if you know how to read and interpret them.

AnswerRe: Identifying Memory leak location PinPopular
Frank Seidler26-Aug-10 1:08
Frank Seidler26-Aug-10 1:08 
AnswerRe: Identifying Memory leak location PinPopular
Chris Losinger26-Aug-10 1:10
professionalChris Losinger26-Aug-10 1:10 
AnswerRe: Identifying Memory leak location Pin
chen shi26-Aug-10 5:10
chen shi26-Aug-10 5:10 
QuestionError 2758 Pin
T.RATHA KRISHNAN25-Aug-10 23:35
T.RATHA KRISHNAN25-Aug-10 23:35 
AnswerRe: Error 2758 Pin
Sauro Viti25-Aug-10 23:57
professionalSauro Viti25-Aug-10 23:57 
GeneralRe: Error 2758 Pin
T.RATHA KRISHNAN26-Aug-10 0:06
T.RATHA KRISHNAN26-Aug-10 0:06 
QuestionUpdate WM_PAINT and Memory DC Pin
HTT9025-Aug-10 22:36
HTT9025-Aug-10 22:36 
AnswerRe: Update WM_PAINT and Memory DC Pin
Niklas L25-Aug-10 23:04
Niklas L25-Aug-10 23:04 
GeneralRe: Update WM_PAINT and Memory DC Pin
HTT9025-Aug-10 23:18
HTT9025-Aug-10 23:18 
GeneralRe: Update WM_PAINT and Memory DC Pin
Niklas L25-Aug-10 23:22
Niklas L25-Aug-10 23:22 
GeneralRe: Update WM_PAINT and Memory DC Pin
HTT9025-Aug-10 23:41
HTT9025-Aug-10 23:41 
GeneralRe: Update WM_PAINT and Memory DC Pin
JohnCz8-Sep-10 18:24
JohnCz8-Sep-10 18:24 
QuestionHow to get character count Pin
raju_shiva25-Aug-10 22:25
raju_shiva25-Aug-10 22:25 
AnswerRe: How to get character count Pin
HTT9025-Aug-10 22:38
HTT9025-Aug-10 22:38 
AnswerRe: How to get character count Pin
Sauro Viti25-Aug-10 22:48
professionalSauro Viti25-Aug-10 22:48 
AnswerRe: How to get character count Pin
Richard MacCutchan25-Aug-10 23:04
mveRichard MacCutchan25-Aug-10 23:04 
GeneralRe: How to get character count Pin
Sauro Viti25-Aug-10 23:17
professionalSauro Viti25-Aug-10 23:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.