Skip to content

Conversation

@bangarumahesh22
Copy link

This PR adds examples/leak_example2.c, a small intentional memory-leak example for Dr. Memory demos and testing.

  • File: examples/leak_example2.c
  • Purpose: simple program that allocates memory and does not free it (used to demonstrate leak detection).
  • Verified locally: ran with Dr. Memory (../build/bin/drmemory -- ../examples/leak_example2) and confirmed a reported leak.

Please let me know if you'd like the example to be modified (e.g., add comments or a README entry).

@@ -0,0 +1,14 @@
#include <stdlib.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in #2567, I am a little confused: so you are proposing creating a new directory examples/? Will these be used in automated tests? What is the bigger picture here: could you file a feature issue in the tracker and describe the goal and link this PR to that new issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants