-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apps/system: replace CONFIG_NSH_LINELEN to LINE_MAX #2918
Changes from 1 commit
73220c3
bff158b
18538c4
ae0325a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,6 +157,14 @@ struct nsh_vtbl_s | |
char traceline[CONFIG_NSH_LINELEN]; | ||
#endif | ||
|
||
/* Temporary line buffer */ | ||
|
||
#if (!defined(CONFIG_NSH_DISABLE_MEMDUMP) && defined(NSH_HAVE_WRITEFILE)) || \ | ||
!defined(CONFIG_NSH_DISABLEBG) || defined(CONFIG_NSH_PIPELINE) || \ | ||
!defined(CONFIG_NSH_DISABLE_WATCH) | ||
char templine[CONFIG_NSH_LINELEN]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but this will increase the heap consumption for the temp use case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compared with irregular heap access, shared template and will make it more deterministic There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you split the rename from moving buffer to nsh_vtbl? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the temp buffer is only used in few command, why move it to nsh_vtbl to extend the life to the whole session? |
||
#endif | ||
|
||
/* Current working directory */ | ||
|
||
#ifdef CONFIG_DISABLE_ENVIRON | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but traceline is used only when launching program, isn't good to keep the buffer in the whole nsh life cycle