xiaoqizhan commented on code in PR #18767:
URL: https://github.com/apache/nuttx/pull/18767#discussion_r3123909234
##########
include/nuttx/fs/fs.h:
##########
@@ -502,6 +502,12 @@ struct fdlist
FAR struct fd *fl_prefd;
struct fd fl_prefds[CONFIG_NFILE_DESCRIPTORS_PER_BLOCK];
+
+#if CONFIG_FS_BACKTRACE > 0 && defined(CONFIG_FS_BACKTRACE_DYNAMIC)
+ atomic_t fl_open_count; /* Current open file descriptor count */
Review Comment:
Hi @xiaoxiang781216 , gentle ping on this.
Did my explanation about the "out-of-the-box fault capturing" for
unexpected random leaks make sense?
That being said, if the community strongly prefers keeping the fast path
(open/dup) absolutely clean and strictly zero-overhead (as you mentioned,
similar to the TCB_FLAG_HEAP_CHECK
design), I am completely open to dropping the dynamic threshold and
changing the implementation to use a manual tg_flags switch instead.
Please let me know which approach you think aligns better with NuttX's
design philosophy for this feature, and I'll update the PR accordingly. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]