how to find memory leak

Started by
13 comments, last by ctoa 21 years, 2 months ago
I''m trying to get this memory manager to work, but I can''t compile anything without getting these errors:

c:\program files\microsoft visual studio\vc98\include\stdlib.h(281) : warning C4002: too many actual parameters for macro ''calloc''
c:\program files\microsoft visual studio\vc98\include\stdlib.h(281) : error C2059: syntax error : ''string''
c:\program files\microsoft visual studio\vc98\include\stdlib.h(283) : error C2062: type ''void'' unexpected
c:\program files\microsoft visual studio\vc98\include\stdlib.h(298) : error C2059: syntax error : ''string''
c:\program files\microsoft visual studio\vc98\include\stdlib.h(306) : error C2059: syntax error : ''string''

Any ideas?
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
Advertisement
It probably replaces malloc, free and the other function using a define, so make sure to include it after you include stdlib.h.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Ok it works now

I just didn''t realize that I had to include stdlib.h as well...
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
Thanks for the link slyterence... I finally figured out why my program is crashing

The manager is telling me that "A memory allocation unit was corrupt because of an overrun" and gives me a line number and everything

Problem is I don''t know what this means, and after looking over the code it seems to be fine...
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
it likly means that you wrote into memory outside of the allocated memory block.

| - Project-X - my mega project.. yup, still cracking along - | - adDeath - an ad blocker I made - | - email me - |

This topic is closed to new replies.

Advertisement