Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions examples/signal_buffer_leak.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#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?

Copy link
Author

Choose a reason for hiding this comment

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

Thank you @derekbruening for reviewing this PR as well.

As I mentioned in #2567 and #2568, you're correct - this PR is also creating a new example file (examples/signal_buffer_leak.c), not editing an existing file.

I've responded to your questions about the bigger picture in the other PRs, and the same applies here:

Key points:

Proposal:

Since all three PRs suffer from the same issues, I'm proposing to:

  1. Close all three PRs as they weren't properly thought through
  2. If you think example files would benefit the project, I can file a feature request with:
    • Clear purpose and use cases
    • Integration plan with documentation/tests
    • Which examples would be most valuable
  3. Wait for maintainer feedback before creating any new PRs

I apologize for the confusion and for not following proper contribution procedures. Should I proceed with closing these PRs?

#include <stdio.h>

#define SIGNAL_SIZE 1000
Copy link
Contributor

Choose a reason for hiding this comment

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

Please explain in comments why this is called "signal": is this related to UNIX signals, or not?


int main() {
printf("Running signal_buffer_leak...\n");
float *signal = (float *)malloc(SIGNAL_SIZE * sizeof(float));

for (int i = 0; i < SIGNAL_SIZE; i++)
signal[i] = i * 0.01f;

printf("Signal processed.\n");

return 0;
}
Loading