Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mm/map: Remove MM_MAP_COUNT_MAX Kconfig and related check #14819

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ config MM_REGIONS
that the memory manager must handle and enables the API
mm_addregion(heap, start, end);

config MM_MAP_COUNT_MAX
int "The maximum number of memory map areas for each task"
default 1024
---help---
The maximum number of memory map areas for each task.

Comment on lines -101 to -106
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiaoxiang781216 could you please elaborate further? Why isn't it necessary to limit the number of map entries? Which other alternative do we have? Please include this information in the commit message!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation could support any number map if the system has enough memory, so it's an artificial limitation and better to remove to simplify the configuration.

config MM_FILL_ALLOCATIONS
bool "Fill allocations with debug value"
default n
Expand Down
11 changes: 0 additions & 11 deletions mm/map/mm_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,8 @@ int mm_map_add(FAR struct mm_map_s *mm, FAR struct mm_map_entry_s *entry)
return ret;
}

/* Too many mappings? */

if (mm->map_count >= CONFIG_MM_MAP_COUNT_MAX)
{
kmm_free(new_entry);
nxrmutex_unlock(&mm->mm_map_mutex);
return -ENOMEM;
}

mm->map_count++;

sq_addfirst((sq_entry_t *)new_entry, &mm->mm_map_sq);

nxrmutex_unlock(&mm->mm_map_mutex);

return OK;
Expand Down
Loading