MCPcopy Create free account
hub / github.com/apache/nuttx / mm_map_initialize

Function mm_map_initialize

mm/map/mm_map.c:112–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 ****************************************************************************/
111
112void mm_map_initialize(FAR struct mm_map_s *mm, bool kernel)
113{
114 sq_init(&mm->mm_map_sq);
115 nxrmutex_init(&mm->mm_map_mutex);
116 mm->map_count = 0;
117
118 /* Create the virtual pages allocator for user process */
119
120#ifdef CONFIG_ARCH_VMA_MAPPING
121 if (!kernel)
122 {
123 mm->mm_map_vpages = gran_initialize((FAR void *)CONFIG_ARCH_SHM_VBASE,
124 ARCH_SHM_SIZE, MM_PGSHIFT, MM_PGSHIFT);
125 if (!mm->mm_map_vpages)
126 {
127 merr("gran_initialize() failed\n");
128 }
129 }
130 else
131 {
132 mm->mm_map_vpages = NULL;
133 }
134#endif
135}
136
137/****************************************************************************
138 * Name: mm_map_destroy

Callers 2

group_initializeFunction · 0.85
kmm_map_initializeFunction · 0.85

Calls 2

nxrmutex_initFunction · 0.85
gran_initializeFunction · 0.85

Tested by

no test coverage detected