Move include/nuttx/mm.h to include/nuttx/mm/mm.h
This commit is contained in:
parent
1863370672
commit
b33c2d9cef
@ -43,7 +43,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
#include <nuttx/mm/shm.h>
|
||||
#include <nuttx/binfmt/binfmt.h>
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <nuttx/userspace.h>
|
||||
#include <nuttx/wqueue.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if defined(CONFIG_BUILD_PROTECTED) && !defined(__KERNEL__)
|
||||
|
||||
@ -114,7 +114,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) =
|
||||
.signal_handler = up_signal_handler,
|
||||
#endif
|
||||
|
||||
/* Memory manager entry points (declared in include/nuttx/mm.h) */
|
||||
/* Memory manager entry points (declared in include/nuttx/mm/mm.h) */
|
||||
|
||||
.mm_initialize = umm_initialize,
|
||||
.mm_addregion = umm_addregion,
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <nuttx/userspace.h>
|
||||
#include <nuttx/wqueue.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if defined(CONFIG_BUILD_PROTECTED) && !defined(__KERNEL__)
|
||||
|
||||
@ -114,7 +114,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) =
|
||||
.signal_handler = up_signal_handler,
|
||||
#endif
|
||||
|
||||
/* Memory manager entry points (declared in include/nuttx/mm.h) */
|
||||
/* Memory manager entry points (declared in include/nuttx/mm/mm.h) */
|
||||
|
||||
.mm_initialize = umm_initialize,
|
||||
.mm_addregion = umm_addregion,
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <nuttx/userspace.h>
|
||||
#include <nuttx/wqueue.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if defined(CONFIG_BUILD_PROTECTED) && !defined(__KERNEL__)
|
||||
|
||||
@ -114,7 +114,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) =
|
||||
.signal_handler = up_signal_handler,
|
||||
#endif
|
||||
|
||||
/* Memory manager entry points (declared in include/nuttx/mm.h) */
|
||||
/* Memory manager entry points (declared in include/nuttx/mm/mm.h) */
|
||||
|
||||
.mm_initialize = umm_initialize,
|
||||
.mm_addregion = umm_addregion,
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <nuttx/userspace.h>
|
||||
#include <nuttx/wqueue.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if defined(CONFIG_BUILD_PROTECTED) && !defined(__KERNEL__)
|
||||
|
||||
@ -114,7 +114,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) =
|
||||
.signal_handler = up_signal_handler,
|
||||
#endif
|
||||
|
||||
/* Memory manager entry points (declared in include/nuttx/mm.h) */
|
||||
/* Memory manager entry points (declared in include/nuttx/mm/mm.h) */
|
||||
|
||||
.mm_initialize = umm_initialize,
|
||||
.mm_addregion = umm_addregion,
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
#include <nuttx/wqueue.h>
|
||||
#include <nuttx/userspace.h>
|
||||
|
||||
@ -115,7 +115,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) =
|
||||
.signal_handler = up_signal_handler,
|
||||
#endif
|
||||
|
||||
/* Memory manager entry points (declared in include/nuttx/mm.h) */
|
||||
/* Memory manager entry points (declared in include/nuttx/mm/mm.h) */
|
||||
|
||||
.mm_initialize = umm_initialize,
|
||||
.mm_addregion = umm_addregion,
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
# include <signal.h>
|
||||
# include <nuttx/mm.h>
|
||||
# include <nuttx/mm/mm.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_ADDRENV
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
#include <nuttx/userspace.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || defined(__KERNEL__)
|
||||
@ -151,7 +151,7 @@ extern "C"
|
||||
# define kmm_free(p) umm_free(p)
|
||||
|
||||
#else
|
||||
/* Otherwise, the kernel-space allocators are declared in include/nuttx/mm.h
|
||||
/* Otherwise, the kernel-space allocators are declared in include/nuttx/mm/mm.h
|
||||
* and we can call them directly.
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/mm.h
|
||||
* include/nuttx/mm/mm.h
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -33,8 +33,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_NUTTX_MM_H
|
||||
#define __INCLUDE_NUTTX_MM_H
|
||||
#ifndef __INCLUDE_NUTTX_MM_MM_H
|
||||
#define __INCLUDE_NUTTX_MM_MM_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
@ -488,4 +488,4 @@ int mm_size2ndx(size_t size);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_MM_H */
|
||||
#endif /* __INCLUDE_NUTTX_MM_MM_H */
|
@ -40,11 +40,11 @@ This directory contains the NuttX memory management logic. This include:
|
||||
|
||||
This allocator can be used to manage multiple heaps (albeit with some
|
||||
non-standard interfaces). A heap is represented by struct mm_heap_s
|
||||
as defined in the file include/nuttx/mm.h. To create another heap
|
||||
as defined in the file include/nuttx/mm/mm.h. To create another heap
|
||||
instance, you would allocate a heap structure, most likely statically
|
||||
in memory:
|
||||
|
||||
include <nuttx/mm.h>
|
||||
include <nuttx/mm/mm.h>
|
||||
static struct mm_heap_s g_myheap;
|
||||
|
||||
Then initialize the heap using:
|
||||
@ -52,7 +52,7 @@ This directory contains the NuttX memory management logic. This include:
|
||||
mm_initialize(&g_myheap, myheap_start, myheap_size);
|
||||
|
||||
Where mm_initialize() and all related interfaces are prototyped in the
|
||||
header file include/nuttx/mm.h.
|
||||
header file include/nuttx/mm/mm.h.
|
||||
|
||||
After the new heap instance has been initialized, it can then be used
|
||||
with these almost familiar interfaces: mm_malloc(), mm_realloc(), mm_free(),
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if defined(CONFIG_MM_KERNEL_HEAP) && defined(CONFIG_DEBUG)
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if defined(CONFIG_BUILD_KERNEL) && defined(__KERNEL__)
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
#include <nuttx/pgalloc.h>
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
#include <nuttx/addrenv.h>
|
||||
#include <nuttx/pgalloc.h>
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#if !defined(CONFIG_BUILD_PROTECTED) || !defined(__KERNEL__)
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/net/net.h>
|
||||
#include <nuttx/lib.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
#include <nuttx/mm/shm.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/init.h>
|
||||
|
Loading…
Reference in New Issue
Block a user