xiaoxiang781216 commented on PR #17564: URL: https://github.com/apache/nuttx/pull/17564#issuecomment-3678582708
> @anchao do you have a new fix? The proposal [anchao@68ce1b8](https://github.com/anchao/nuttx/commit/68ce1b83280a721fc275ac94a299007d01aa6bc2) seems a little bit awkward using tcb and group offset operations, maybe you can create are struct type where the first member is a "struct task_group_s" and the second is a "struct tcb_s", then you do a casting and point to the right struct. Please don't take it as a critique, this is just a suggestion to make the code more readable. > It's wrong to allocate tcb_s and task_group_s in one kmm_malloc since each has the different lile cycle, this type of optimization: 1. make the code ugly and hard to maintain 2. waste memory after main thread exit, but other thread keep running > Should we wait for a proper fix instead of merging this PR here? it's better to revert the optimization directly. -- 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]
