diff --git a/mm/Makefile b/mm/Makefile index 50dd83b5f5..188b6c7971 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -56,17 +56,7 @@ CSRCS = DEPPATH = --dep-path . VPATH = . -# Core allocator logic - -CSRCS += mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c -CSRCS += mm_shrinkchunk.c -CSRCS += mm_brkaddr.c mm_calloc.c mm_extend.c mm_free.c mm_mallinfo.c -CSRCS += mm_malloc.c mm_memalign.c mm_realloc.c mm_zalloc.c - -ifeq ($(CONFIG_BUILD_KERNEL),y) -CSRCS += mm_sbrk.c -endif - +include mm_heap/Make.defs include umm_heap/Make.defs include kmm_heap/Make.defs include mm_gran/Make.defs diff --git a/mm/mm_addfreechunk.c b/mm/mm_heap/mm_addfreechunk.c similarity index 99% rename from mm/mm_addfreechunk.c rename to mm/mm_heap/mm_addfreechunk.c index 7931c59bb8..86ecfa1297 100644 --- a/mm/mm_addfreechunk.c +++ b/mm/mm_heap/mm_addfreechunk.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_addfreechunk.c + * mm/mm_heap/mm_addfreechunk.c * * Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_brkaddr.c b/mm/mm_heap/mm_brkaddr.c similarity index 99% rename from mm/mm_brkaddr.c rename to mm/mm_heap/mm_brkaddr.c index 8476050c4e..74f9facc7a 100644 --- a/mm/mm_brkaddr.c +++ b/mm/mm_heap/mm_brkaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_brkaddr.c + * mm/mm_heap/mm_brkaddr.c * * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_calloc.c b/mm/mm_heap/mm_calloc.c similarity index 99% rename from mm/mm_calloc.c rename to mm/mm_heap/mm_calloc.c index c78ede8d4e..4d23512acb 100644 --- a/mm/mm_calloc.c +++ b/mm/mm_heap/mm_calloc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_calloc.c + * mm/mm_heap/mm_calloc.c * * Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_extend.c b/mm/mm_heap/mm_extend.c similarity index 99% rename from mm/mm_extend.c rename to mm/mm_heap/mm_extend.c index 8343607605..d8a7f72f44 100644 --- a/mm/mm_extend.c +++ b/mm/mm_heap/mm_extend.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_extend.c + * mm/mm_heap/mm_extend.c * * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_free.c b/mm/mm_heap/mm_free.c similarity index 99% rename from mm/mm_free.c rename to mm/mm_heap/mm_free.c index bcc04abc9c..e3613484e4 100644 --- a/mm/mm_free.c +++ b/mm/mm_heap/mm_free.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_free.c + * mm/mm_heap/mm_free.c * * Copyright (C) 2007, 2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_initialize.c b/mm/mm_heap/mm_initialize.c similarity index 99% rename from mm/mm_initialize.c rename to mm/mm_heap/mm_initialize.c index 6107a7b7d0..cfddc8d2a6 100644 --- a/mm/mm_initialize.c +++ b/mm/mm_heap/mm_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_initialize.c + * mm/mm_heap/mm_initialize.c * * Copyright (C) 2007, 2009, 2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_mallinfo.c b/mm/mm_heap/mm_mallinfo.c similarity index 99% rename from mm/mm_mallinfo.c rename to mm/mm_heap/mm_mallinfo.c index 6f00a8f035..5426b1eee3 100644 --- a/mm/mm_mallinfo.c +++ b/mm/mm_heap/mm_mallinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_mallinfo.c + * mm/mm_heap/mm_mallinfo.c * * Copyright (C) 2007, 2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_malloc.c b/mm/mm_heap/mm_malloc.c similarity index 99% rename from mm/mm_malloc.c rename to mm/mm_heap/mm_malloc.c index 47237f99f9..6aa76a3d49 100644 --- a/mm/mm_malloc.c +++ b/mm/mm_heap/mm_malloc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_malloc.c + * mm/mm_heap/mm_malloc.c * * Copyright (C) 2007, 2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_memalign.c b/mm/mm_heap/mm_memalign.c similarity index 99% rename from mm/mm_memalign.c rename to mm/mm_heap/mm_memalign.c index a45d7ffe40..0aeaf2c787 100644 --- a/mm/mm_memalign.c +++ b/mm/mm_heap/mm_memalign.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_memalign.c + * mm/mm_heap/mm_memalign.c * * Copyright (C) 2007, 2009, 2011, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_realloc.c b/mm/mm_heap/mm_realloc.c similarity index 99% rename from mm/mm_realloc.c rename to mm/mm_heap/mm_realloc.c index c85e127666..21a0f7d5d7 100644 --- a/mm/mm_realloc.c +++ b/mm/mm_heap/mm_realloc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_realloc.c + * mm/mm_heap/mm_realloc.c * * Copyright (C) 2007, 2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_sbrk.c b/mm/mm_heap/mm_sbrk.c similarity index 99% rename from mm/mm_sbrk.c rename to mm/mm_heap/mm_sbrk.c index dc4c0318ec..6a46770606 100644 --- a/mm/mm_sbrk.c +++ b/mm/mm_heap/mm_sbrk.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_sbrk.c + * mm/mm_heap/mm_sbrk.c * * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_sem.c b/mm/mm_heap/mm_sem.c similarity index 99% rename from mm/mm_sem.c rename to mm/mm_heap/mm_sem.c index e72f7d7963..baec83732e 100644 --- a/mm/mm_sem.c +++ b/mm/mm_heap/mm_sem.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_sem.c + * mm/mm_heap/mm_sem.c * * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_shrinkchunk.c b/mm/mm_heap/mm_shrinkchunk.c similarity index 99% rename from mm/mm_shrinkchunk.c rename to mm/mm_heap/mm_shrinkchunk.c index b88baa6d4d..58cffb9fd3 100644 --- a/mm/mm_shrinkchunk.c +++ b/mm/mm_heap/mm_shrinkchunk.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_shrinkchunk.c + * mm/mm_heap/mm_shrinkchunk.c * * Copyright (C) 2007, 2009, 1013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_size2ndx.c b/mm/mm_heap/mm_size2ndx.c similarity index 99% rename from mm/mm_size2ndx.c rename to mm/mm_heap/mm_size2ndx.c index 038b92142a..2989e6c075 100644 --- a/mm/mm_size2ndx.c +++ b/mm/mm_heap/mm_size2ndx.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_size2ndx.c + * mm/mm_heap/mm_size2ndx.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/mm/mm_zalloc.c b/mm/mm_heap/mm_zalloc.c similarity index 99% rename from mm/mm_zalloc.c rename to mm/mm_heap/mm_zalloc.c index c665adc04b..2706c44aff 100644 --- a/mm/mm_zalloc.c +++ b/mm/mm_heap/mm_zalloc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * mm/mm_zalloc.c + * mm/mm_heap/mm_zalloc.c * * Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt