mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
libc/stdio: Allocate file_struct dynamically
1.Reduce the default size of task_group_s(~512B each task) 2.Scale better between simple and complex application Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Ia872137504fddcf64d89c48d6f0593d76d582710
This commit is contained in:
@@ -66,8 +66,8 @@
|
||||
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
{
|
||||
FAR struct filelist *filelist;
|
||||
#if CONFIG_NFILE_STREAMS > 0
|
||||
FAR struct streamlist *streamlist;
|
||||
#ifdef CONFIG_FILE_STREAM
|
||||
FAR struct file_struct *filep;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
@@ -85,11 +85,10 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
#if CONFIG_NFILE_STREAMS > 0
|
||||
streamlist = tcb->group->tg_streamlist;
|
||||
for (i = 0; i < CONFIG_NFILE_STREAMS; i++)
|
||||
#ifdef CONFIG_FILE_STREAM
|
||||
filep = tcb->group->tg_streamlist->sl_head;
|
||||
for (; filep != NULL; filep = filep->fs_next)
|
||||
{
|
||||
struct file_struct *filep = &streamlist->sl_streams[i];
|
||||
if (filep->fs_fd >= 0)
|
||||
{
|
||||
#ifndef CONFIG_STDIO_DISABLE_BUFFERING
|
||||
|
||||
Reference in New Issue
Block a user