Fix a typo that crept into lpc17_allocateheap.c in the recent kernel allocator changes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5729 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2013-03-11 13:21:33 +00:00
parent 3781d761f3
commit 2b64d4742a
8 changed files with 74 additions and 63 deletions
+19
View File
@@ -189,6 +189,25 @@ int group_allocate(FAR struct task_tcb_s *tcb)
return -ENOMEM;
}
#if CONFIG_NFILE_STREAMS > 0 && defined(CONFIG_NUTTX_KERNEL) && \
defined(CONFIG_MM_KERNEL_HEAP)
/* In a flat, single-heap build. The stream list is allocated with the
* group structure. But in a kernel build with a kernel allocator, it
* must be separately allocated using a user-space allocator.
*/
group->tg_streamlist = (FAR struct streamlist *)
kuzalloc(sizeof(struct streamlist));
if (!group->tg_streamlist)
{
kfree(group);
return -ENOMEM;
}
#endif
/* Attach the group to the TCB */
tcb->cmn.group = group;
+11
View File
@@ -218,6 +218,17 @@ static inline void group_release(FAR struct task_group_s *group)
}
#endif
#if CONFIG_NFILE_STREAMS > 0 && defined(CONFIG_NUTTX_KERNEL) && \
defined(CONFIG_MM_KERNEL_HEAP)
/* In a flat, single-heap build. The stream list is part of the
* group structure. But in a kernel build with a kernel allocator, it
* must be separately de-allocated user the user-space deallocator.
*/
sched_ufree(group->tg_streamlist);
#endif
/* Release the group container itself */
sched_kfree(group);