Diagnosis of memory leaks?

Post a reply

This question is a means of preventing automated form submissions by spambots.

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is OFF
Smilies are OFF

Topic review

Expand view Topic review: Diagnosis of memory leaks?

Re: Diagnosis of memory leaks?

by mmetivier » Wed Oct 23, 2019 1:28 pm

There are several messages that purport to diagnose memory leaks, for example:

423: assignment to custodial pointer _symbol_ likely creates memory leak
429: custodial pointer _symbol_ likely not _string_ nor returned
593: custodial pointer _symbol_ possibly not _string_ nor returned
672: assignment to custodial pointer _symbol_ possibly creates memory leak
698: in-place realloc of _symbol_ could cause a memory leak

Working in an embedded environment in which dynamic memory allocation is strictly forbidden, I have not tested these conditions and so can't speak to the thoroughness of Gimpel's analysis, but it does seem to be available.

You could probably check a snippet that you're interested in by using the online demo at https://www.gimpel.com/demo.html

Diagnosis of memory leaks?

by rbriggs » Mon Oct 21, 2019 7:13 pm


I write to you today in earnest with an inquiry regarding the present topic for "PC-lint Plus". Can detection be elicited with respect to memory which having been allocated then is subject to an unfortunate failure to deallocate? This is in theory made with "new", but, then, where it should be "delete", there is in fact, no "delete", but nothing, and the memory leaks - or "malloc" et cetera. Is this diagnosed?

Thank you sincerely