mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 12:08:36 +08:00
Fix some kernel-mode compilation problems
This commit is contained in:
parent
bdf1ad69d6
commit
0c6474cdf0
2 changed files with 4 additions and 2 deletions
|
@ -83,7 +83,7 @@ FAR void *mm_memalign(FAR struct mm_heap_s *heap, size_t alignment,
|
||||||
|
|
||||||
if (alignment <= MM_MIN_CHUNK)
|
if (alignment <= MM_MIN_CHUNK)
|
||||||
{
|
{
|
||||||
return malloc(size);
|
return mm_malloc(heap, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust the size to account for (1) the size of the allocated node, (2)
|
/* Adjust the size to account for (1) the size of the allocated node, (2)
|
||||||
|
@ -103,7 +103,7 @@ FAR void *mm_memalign(FAR struct mm_heap_s *heap, size_t alignment,
|
||||||
|
|
||||||
/* Then malloc that size */
|
/* Then malloc that size */
|
||||||
|
|
||||||
rawchunk = (size_t)malloc(allocsize);
|
rawchunk = (size_t)mm_malloc(heap, allocsize);
|
||||||
if (rawchunk == 0)
|
if (rawchunk == 0)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
#include <syscall.h>
|
#include <syscall.h>
|
||||||
|
|
||||||
/* The content of this file is only meaningful during the kernel phase of
|
/* The content of this file is only meaningful during the kernel phase of
|
||||||
|
|
Loading…
Reference in a new issue