mm: Integrate TLSF manager

can be enabled by CONFIG_MM_TLSF_MANAGER=y

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id3cb6549b6dd881a9549f3202ab4b3ebdceb3ca4
This commit is contained in:
Xiang Xiao
2021-03-08 17:21:23 +08:00
parent 05abfac89b
commit 777a99ea00
5 changed files with 1168 additions and 0 deletions
+5
View File
@@ -12,6 +12,11 @@ config MM_DEFAULT_MANAGER
---help---
NuttX original memory manager strategy.
config MM_TLSF_MANAGER
bool "TLSF heap manager"
---help---
TLSF(http://www.gii.upv.es/tlsf/) memory manager strategy.
config MM_CUSTOMIZE_MANAGER
bool "Customized heap manager"
---help---
+1
View File
@@ -44,6 +44,7 @@ include mm_gran/Make.defs
include shm/Make.defs
include iob/Make.defs
include circbuf/Make.defs
include tlsf/Make.defs
BINDIR ?= bin
+1
View File
@@ -0,0 +1 @@
/tlsf
+32
View File
@@ -0,0 +1,32 @@
############################################################################
# mm/tlsf/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
# tlfs memory allocator
ifeq ($(CONFIG_MM_TLSF_MANAGER),y)
CSRCS += mm_tlsf.c tlsf.c
CFLAGS += ${shell $(DEFINE) "$(CC)" tlsf_printf=merr}
# Add the tlsf directory to the build
DEPPATH += --dep-path tlsf --dep-path tlsf/tlsf
VPATH += :tlsf:tlsf/tlsf
endif
+1129
View File
File diff suppressed because it is too large Load Diff