mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
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:
@@ -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---
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/tlsf
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user