From 4317c469953a90fe6f43b5a5306c71f8fb19705f Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 5 Apr 2011 15:50:01 +0000 Subject: Add a layer to redirect kernel-mode memory manager accesses git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3466 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/Documentation/NuttxPortingGuide.html | 5 +- nuttx/configs/README.txt | 3 +- nuttx/configs/avr32dev1/nsh/defconfig | 3 - nuttx/configs/avr32dev1/ostest/defconfig | 3 - nuttx/configs/c5471evm/httpd/defconfig | 3 - nuttx/configs/c5471evm/nettest/defconfig | 3 - nuttx/configs/c5471evm/nsh/defconfig | 3 - nuttx/configs/c5471evm/ostest/defconfig | 3 - nuttx/configs/demo9s12ne64/ostest/defconfig | 3 - nuttx/configs/detron/hidkbd/defconfig | 3 - nuttx/configs/detron/nsh/defconfig | 3 - nuttx/configs/detron/ostest/defconfig | 3 - nuttx/configs/detron/wlan/defconfig | 3 - nuttx/configs/ea3131/nsh/defconfig | 3 - nuttx/configs/ea3131/ostest/defconfig | 3 - nuttx/configs/ea3131/pgnsh/defconfig | 3 - nuttx/configs/ea3131/usbserial/defconfig | 3 - nuttx/configs/ea3131/usbstorage/defconfig | 3 - nuttx/configs/eagle100/httpd/defconfig | 3 - nuttx/configs/eagle100/nettest/defconfig | 3 - nuttx/configs/eagle100/nsh/defconfig | 3 - nuttx/configs/eagle100/nxflat/defconfig | 3 - nuttx/configs/eagle100/ostest/defconfig | 3 - nuttx/configs/eagle100/thttpd/defconfig | 3 - nuttx/configs/ez80f910200kitg/ostest/defconfig | 3 - nuttx/configs/ez80f910200zco/dhcpd/defconfig | 3 - nuttx/configs/ez80f910200zco/httpd/defconfig | 3 - nuttx/configs/ez80f910200zco/nettest/defconfig | 3 - nuttx/configs/ez80f910200zco/nsh/defconfig | 3 - nuttx/configs/ez80f910200zco/ostest/defconfig | 3 - nuttx/configs/ez80f910200zco/poll/defconfig | 3 - nuttx/configs/lm3s6965-ek/nsh/defconfig | 3 - nuttx/configs/lm3s6965-ek/nx/defconfig | 3 - nuttx/configs/lm3s6965-ek/ostest/defconfig | 3 - nuttx/configs/lm3s8962-ek/nsh/defconfig | 3 - nuttx/configs/lm3s8962-ek/nx/defconfig | 3 - nuttx/configs/lm3s8962-ek/ostest/defconfig | 3 - nuttx/configs/m68332evb/defconfig | 3 - nuttx/configs/mbed/hidkbd/defconfig | 3 - nuttx/configs/mbed/nsh/defconfig | 3 - nuttx/configs/mcu123-lpc214x/nsh/defconfig | 3 - nuttx/configs/mcu123-lpc214x/ostest/defconfig | 3 - nuttx/configs/mcu123-lpc214x/usbserial/defconfig | 3 - nuttx/configs/mcu123-lpc214x/usbstorage/defconfig | 3 - nuttx/configs/mx1ads/ostest/defconfig | 3 - nuttx/configs/ne64badge/ostest/defconfig | 3 - nuttx/configs/ntosd-dm320/nettest/defconfig | 3 - nuttx/configs/ntosd-dm320/nsh/defconfig | 3 - nuttx/configs/ntosd-dm320/ostest/defconfig | 3 - nuttx/configs/ntosd-dm320/poll/defconfig | 3 - nuttx/configs/ntosd-dm320/thttpd/defconfig | 3 - nuttx/configs/ntosd-dm320/udp/defconfig | 3 - nuttx/configs/ntosd-dm320/uip/defconfig | 3 - nuttx/configs/nucleus2g/nsh/defconfig | 3 - nuttx/configs/nucleus2g/ostest/defconfig | 3 - nuttx/configs/nucleus2g/usbserial/defconfig | 3 - nuttx/configs/nucleus2g/usbstorage/defconfig | 3 - nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig | 3 - nuttx/configs/olimex-lpc1766stk/nettest/defconfig | 3 - nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 3 - nuttx/configs/olimex-lpc1766stk/nx/defconfig | 3 - nuttx/configs/olimex-lpc1766stk/ostest/defconfig | 3 - .../configs/olimex-lpc1766stk/slip-httpd/defconfig | 3 - nuttx/configs/olimex-lpc1766stk/thttpd/defconfig | 3 - .../configs/olimex-lpc1766stk/usbserial/defconfig | 3 - .../configs/olimex-lpc1766stk/usbstorage/defconfig | 3 - nuttx/configs/olimex-lpc1766stk/wlan/defconfig | 3 - nuttx/configs/olimex-lpc2378/nsh/defconfig | 3 - nuttx/configs/olimex-lpc2378/ostest/defconfig | 3 - nuttx/configs/olimex-strp711/nettest/defconfig | 3 - nuttx/configs/olimex-strp711/nsh/defconfig | 3 - nuttx/configs/olimex-strp711/ostest/defconfig | 3 - nuttx/configs/pjrc-8051/defconfig | 3 - nuttx/configs/qemu-i486/nsh/defconfig | 3 - nuttx/configs/qemu-i486/ostest/defconfig | 3 - nuttx/configs/sam3u-ek/kernel/Makefile | 12 ++- nuttx/configs/sam3u-ek/kernel/kernel.ld | 6 ++ nuttx/configs/sam3u-ek/knsh/defconfig | 3 - nuttx/configs/sam3u-ek/nsh/defconfig | 3 - nuttx/configs/sam3u-ek/nx/defconfig | 3 - nuttx/configs/sam3u-ek/ostest/defconfig | 3 - nuttx/configs/sim/mount/defconfig | 3 - nuttx/configs/sim/nettest/defconfig | 3 - nuttx/configs/sim/nsh/defconfig | 3 - nuttx/configs/sim/nx/defconfig | 3 - nuttx/configs/sim/nx/defconfig-x11 | 3 - nuttx/configs/sim/ostest/defconfig | 3 - nuttx/configs/sim/pashello/defconfig | 3 - nuttx/configs/skp16c26/ostest/defconfig | 3 - nuttx/configs/stm3210e-eval/RIDE/defconfig | 3 - nuttx/configs/stm3210e-eval/nsh/defconfig | 3 - nuttx/configs/stm3210e-eval/ostest/defconfig | 3 - nuttx/configs/stm3210e-eval/usbserial/defconfig | 3 - nuttx/configs/stm3210e-eval/usbstorage/defconfig | 3 - nuttx/configs/us7032evb1/nsh/defconfig | 3 - nuttx/configs/us7032evb1/ostest/defconfig | 3 - nuttx/configs/vsn/nsh/defconfig | 3 - nuttx/configs/xtrs/nsh/defconfig | 3 - nuttx/configs/xtrs/ostest/defconfig | 3 - nuttx/configs/xtrs/pashello/defconfig | 3 - nuttx/configs/z16f2800100zcog/ostest/defconfig | 3 - nuttx/configs/z16f2800100zcog/pashello/defconfig | 3 - nuttx/configs/z80sim/nsh/defconfig | 3 - nuttx/configs/z80sim/ostest/defconfig | 3 - nuttx/configs/z80sim/pashello/defconfig | 3 - nuttx/configs/z8encore000zco/ostest/defconfig | 3 - nuttx/configs/z8f64200100kit/ostest/defconfig | 3 - nuttx/include/nuttx/kmalloc.h | 43 ++++---- nuttx/sched/Makefile | 6 ++ nuttx/sched/env_putenv.c | 1 + nuttx/sched/env_setenv.c | 1 + nuttx/sched/kmm_kfree.c | 110 +++++++++++++++++++++ nuttx/sched/kmm_kmalloc.c | 110 +++++++++++++++++++++ nuttx/sched/kmm_krealloc.c | 110 +++++++++++++++++++++ nuttx/sched/kmm_kzalloc.c | 110 +++++++++++++++++++++ nuttx/sched/task_delete.c | 12 ++- nuttx/sched/timer_delete.c | 1 + 117 files changed, 496 insertions(+), 343 deletions(-) create mode 100644 nuttx/sched/kmm_kfree.c create mode 100644 nuttx/sched/kmm_kmalloc.c create mode 100644 nuttx/sched/kmm_krealloc.c create mode 100644 nuttx/sched/kmm_kzalloc.c (limited to 'nuttx') diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index eaa603a4a..1f27a5565 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: April 3, 2011

+

Last Updated: April 5, 2011

@@ -3209,8 +3209,7 @@ build CONFIG_ARCH_MEMCPY, CONFIG_ARCH_MEMCMP, CONFIG_ARCH_MEMMOVE, CONFIG_ARCH_MEMSET, CONFIG_ARCH_STRCMP, CONFIG_ARCH_STRCPY, CONFIG_ARCH_STRNCPY, CONFIG_ARCH_STRLEN, CONFIG_ARCH_STRNLEN, - CONFIG_ARCH_BZERO, CONFIG_ARCH_KMALLOC, CONFIG_ARCH_KZMALLOC, - ONFIG_ARCH_KFREE, + CONFIG_ARCH_BZERO

diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 560aa2a11..ed3462b28 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -478,8 +478,7 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_ARCH_MEMCPY, CONFIG_ARCH_MEMCMP, CONFIG_ARCH_MEMMOVE CONFIG_ARCH_MEMSET, CONFIG_ARCH_STRCMP, CONFIG_ARCH_STRCPY CONFIG_ARCH_STRNCPY, CONFIG_ARCH_STRLEN, CONFIG_ARCH_STRNLEN - CONFIG_ARCH_BZERO, CONFIG_ARCH_KMALLOC, CONFIG_ARCH_KZMALLOC - CONFIG_ARCH_KFREE + CONFIG_ARCH_BZERO Sizes of configurable things (0 disables) diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig index bbe3a92f9..20793d48b 100755 --- a/nuttx/configs/avr32dev1/nsh/defconfig +++ b/nuttx/configs/avr32dev1/nsh/defconfig @@ -383,9 +383,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index c68984353..7039557bc 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -383,9 +383,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/c5471evm/httpd/defconfig b/nuttx/configs/c5471evm/httpd/defconfig index e7e3479f8..6f27c5708 100644 --- a/nuttx/configs/c5471evm/httpd/defconfig +++ b/nuttx/configs/c5471evm/httpd/defconfig @@ -272,9 +272,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/c5471evm/nettest/defconfig b/nuttx/configs/c5471evm/nettest/defconfig index fb35d1ee8..07b217fca 100644 --- a/nuttx/configs/c5471evm/nettest/defconfig +++ b/nuttx/configs/c5471evm/nettest/defconfig @@ -272,9 +272,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/c5471evm/nsh/defconfig b/nuttx/configs/c5471evm/nsh/defconfig index 026d761ba..81b09c570 100644 --- a/nuttx/configs/c5471evm/nsh/defconfig +++ b/nuttx/configs/c5471evm/nsh/defconfig @@ -272,9 +272,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/c5471evm/ostest/defconfig b/nuttx/configs/c5471evm/ostest/defconfig index 2cbc0fe51..d265a2b33 100644 --- a/nuttx/configs/c5471evm/ostest/defconfig +++ b/nuttx/configs/c5471evm/ostest/defconfig @@ -272,9 +272,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig index b5b432759..e3542a07c 100755 --- a/nuttx/configs/demo9s12ne64/ostest/defconfig +++ b/nuttx/configs/demo9s12ne64/ostest/defconfig @@ -362,9 +362,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/detron/hidkbd/defconfig b/nuttx/configs/detron/hidkbd/defconfig index 28efc6d74..b359b2953 100755 --- a/nuttx/configs/detron/hidkbd/defconfig +++ b/nuttx/configs/detron/hidkbd/defconfig @@ -402,9 +402,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/detron/nsh/defconfig b/nuttx/configs/detron/nsh/defconfig index c8af3917b..326ba47d9 100755 --- a/nuttx/configs/detron/nsh/defconfig +++ b/nuttx/configs/detron/nsh/defconfig @@ -407,9 +407,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/detron/ostest/defconfig b/nuttx/configs/detron/ostest/defconfig index f247c9a2a..115ee6b74 100755 --- a/nuttx/configs/detron/ostest/defconfig +++ b/nuttx/configs/detron/ostest/defconfig @@ -397,9 +397,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/detron/wlan/defconfig b/nuttx/configs/detron/wlan/defconfig index 7bb17be90..6ab071b01 100755 --- a/nuttx/configs/detron/wlan/defconfig +++ b/nuttx/configs/detron/wlan/defconfig @@ -406,9 +406,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig index 712c85fd8..9c6faa8ac 100755 --- a/nuttx/configs/ea3131/nsh/defconfig +++ b/nuttx/configs/ea3131/nsh/defconfig @@ -368,9 +368,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig index c09f0c00b..9df0b90c1 100755 --- a/nuttx/configs/ea3131/ostest/defconfig +++ b/nuttx/configs/ea3131/ostest/defconfig @@ -368,9 +368,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig index aa18038b9..471792d59 100755 --- a/nuttx/configs/ea3131/pgnsh/defconfig +++ b/nuttx/configs/ea3131/pgnsh/defconfig @@ -514,9 +514,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index 4b2530af6..f5df53002 100755 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -370,9 +370,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig index da1f5afc7..e8cb6216e 100755 --- a/nuttx/configs/ea3131/usbstorage/defconfig +++ b/nuttx/configs/ea3131/usbstorage/defconfig @@ -370,9 +370,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig index 4d819930b..78eda467d 100644 --- a/nuttx/configs/eagle100/httpd/defconfig +++ b/nuttx/configs/eagle100/httpd/defconfig @@ -341,9 +341,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/eagle100/nettest/defconfig b/nuttx/configs/eagle100/nettest/defconfig index f7810a201..31c4e3946 100644 --- a/nuttx/configs/eagle100/nettest/defconfig +++ b/nuttx/configs/eagle100/nettest/defconfig @@ -341,9 +341,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/eagle100/nsh/defconfig b/nuttx/configs/eagle100/nsh/defconfig index b20d339d7..d3a4642b0 100644 --- a/nuttx/configs/eagle100/nsh/defconfig +++ b/nuttx/configs/eagle100/nsh/defconfig @@ -340,9 +340,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig index dd5c46a4b..d6782d333 100644 --- a/nuttx/configs/eagle100/nxflat/defconfig +++ b/nuttx/configs/eagle100/nxflat/defconfig @@ -353,9 +353,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/eagle100/ostest/defconfig b/nuttx/configs/eagle100/ostest/defconfig index 321a0911a..2f531a06e 100644 --- a/nuttx/configs/eagle100/ostest/defconfig +++ b/nuttx/configs/eagle100/ostest/defconfig @@ -347,9 +347,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/eagle100/thttpd/defconfig b/nuttx/configs/eagle100/thttpd/defconfig index 0008b8e75..08a6f4835 100644 --- a/nuttx/configs/eagle100/thttpd/defconfig +++ b/nuttx/configs/eagle100/thttpd/defconfig @@ -360,9 +360,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index fe23817c1..93960cd50 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -306,9 +306,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig index 9270d0522..d2540d204 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig +++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig @@ -312,9 +312,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig index 026ccdd08..1cbea1a6d 100644 --- a/nuttx/configs/ez80f910200zco/httpd/defconfig +++ b/nuttx/configs/ez80f910200zco/httpd/defconfig @@ -312,9 +312,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig index 746bd0224..5cf42e7e0 100644 --- a/nuttx/configs/ez80f910200zco/nettest/defconfig +++ b/nuttx/configs/ez80f910200zco/nettest/defconfig @@ -312,9 +312,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig index c866e9542..78741dad2 100644 --- a/nuttx/configs/ez80f910200zco/nsh/defconfig +++ b/nuttx/configs/ez80f910200zco/nsh/defconfig @@ -312,9 +312,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index 2bb4ce44e..4ab55d5f3 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -309,9 +309,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig index b5cde349f..6d08c0391 100644 --- a/nuttx/configs/ez80f910200zco/poll/defconfig +++ b/nuttx/configs/ez80f910200zco/poll/defconfig @@ -312,9 +312,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 77357971f..27d09a868 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -362,9 +362,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index a0f155559..8c89c0594 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -368,9 +368,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index 933db9a5a..7c678b3a4 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -361,9 +361,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig index add9a6167..ef71ef662 100755 --- a/nuttx/configs/lm3s8962-ek/nsh/defconfig +++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig @@ -362,9 +362,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig index 1be795ecd..24d9e0ebc 100755 --- a/nuttx/configs/lm3s8962-ek/nx/defconfig +++ b/nuttx/configs/lm3s8962-ek/nx/defconfig @@ -368,9 +368,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig index db9304a4c..a858ea3eb 100755 --- a/nuttx/configs/lm3s8962-ek/ostest/defconfig +++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig @@ -361,9 +361,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig index ddd7fcbf6..7af074c76 100644 --- a/nuttx/configs/m68332evb/defconfig +++ b/nuttx/configs/m68332evb/defconfig @@ -238,9 +238,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig index dbda7b3e3..25260cee9 100644 --- a/nuttx/configs/mbed/hidkbd/defconfig +++ b/nuttx/configs/mbed/hidkbd/defconfig @@ -405,9 +405,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig index 905a11a7f..308e58bda 100755 --- a/nuttx/configs/mbed/nsh/defconfig +++ b/nuttx/configs/mbed/nsh/defconfig @@ -397,9 +397,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig index 66f9def27..c5dad8825 100644 --- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig +++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig @@ -276,9 +276,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig index 1e47a77a2..5446b0ca8 100644 --- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig +++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig @@ -276,9 +276,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig index 5ae98dba8..0f8d4925a 100644 --- a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig @@ -276,9 +276,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig index f4e423780..21c09e07c 100644 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig @@ -277,9 +277,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig index 81f271ec0..ea908547f 100644 --- a/nuttx/configs/mx1ads/ostest/defconfig +++ b/nuttx/configs/mx1ads/ostest/defconfig @@ -292,9 +292,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig index 61f09986d..c46d58d43 100755 --- a/nuttx/configs/ne64badge/ostest/defconfig +++ b/nuttx/configs/ne64badge/ostest/defconfig @@ -373,9 +373,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig index 216eff7e7..87fd5d140 100644 --- a/nuttx/configs/ntosd-dm320/nettest/defconfig +++ b/nuttx/configs/ntosd-dm320/nettest/defconfig @@ -280,9 +280,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig index d46a1b6c5..78f2aeddb 100644 --- a/nuttx/configs/ntosd-dm320/nsh/defconfig +++ b/nuttx/configs/ntosd-dm320/nsh/defconfig @@ -279,9 +279,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig index f9b863c28..246bbae29 100644 --- a/nuttx/configs/ntosd-dm320/ostest/defconfig +++ b/nuttx/configs/ntosd-dm320/ostest/defconfig @@ -280,9 +280,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig index bb584936a..51c9981bf 100644 --- a/nuttx/configs/ntosd-dm320/poll/defconfig +++ b/nuttx/configs/ntosd-dm320/poll/defconfig @@ -280,9 +280,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig index d92b971d1..886af9e89 100644 --- a/nuttx/configs/ntosd-dm320/thttpd/defconfig +++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig @@ -305,9 +305,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig index a9dc75dcf..67c204bb2 100644 --- a/nuttx/configs/ntosd-dm320/udp/defconfig +++ b/nuttx/configs/ntosd-dm320/udp/defconfig @@ -280,9 +280,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig index 5b8b8d878..2b0d101e6 100644 --- a/nuttx/configs/ntosd-dm320/uip/defconfig +++ b/nuttx/configs/ntosd-dm320/uip/defconfig @@ -280,9 +280,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig index 7c8bc2c17..4dc066b8a 100755 --- a/nuttx/configs/nucleus2g/nsh/defconfig +++ b/nuttx/configs/nucleus2g/nsh/defconfig @@ -401,9 +401,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig index 0b8df6124..82549346c 100755 --- a/nuttx/configs/nucleus2g/ostest/defconfig +++ b/nuttx/configs/nucleus2g/ostest/defconfig @@ -397,9 +397,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index f20eed8f3..7d9ed920f 100755 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -398,9 +398,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig index 4eeac6d4f..6d852d94b 100755 --- a/nuttx/configs/nucleus2g/usbstorage/defconfig +++ b/nuttx/configs/nucleus2g/usbstorage/defconfig @@ -398,9 +398,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index a55ba91a9..5da615c1b 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -405,9 +405,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index 353036bfd..87a8de988 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -405,9 +405,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index db03deeea..5c8bcf067 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -405,9 +405,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index 2d61bca84..b0a8b795b 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -409,9 +409,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index 4122d8d09..01f6e418b 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -398,9 +398,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index 71a5109df..068d44f8a 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -416,9 +416,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig index b92d886d5..f51f083a8 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig @@ -414,9 +414,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index 73f52406d..f5237146f 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -399,9 +399,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig index 841601f74..c7ecd0187 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -399,9 +399,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index 00c02552f..7a8441feb 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -405,9 +405,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig index 597b80d5d..7aaeb27ae 100755 --- a/nuttx/configs/olimex-lpc2378/nsh/defconfig +++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig @@ -266,9 +266,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig index a7b0b25d5..3e1093723 100755 --- a/nuttx/configs/olimex-lpc2378/ostest/defconfig +++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig @@ -266,9 +266,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig index 9179ae8d3..159c5916a 100755 --- a/nuttx/configs/olimex-strp711/nettest/defconfig +++ b/nuttx/configs/olimex-strp711/nettest/defconfig @@ -367,9 +367,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig index a8ba52709..cf324c4dc 100644 --- a/nuttx/configs/olimex-strp711/nsh/defconfig +++ b/nuttx/configs/olimex-strp711/nsh/defconfig @@ -343,9 +343,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig index dc81b213f..d914aaa74 100644 --- a/nuttx/configs/olimex-strp711/ostest/defconfig +++ b/nuttx/configs/olimex-strp711/ostest/defconfig @@ -343,9 +343,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/pjrc-8051/defconfig b/nuttx/configs/pjrc-8051/defconfig index 2ae280ff1..811d346b5 100644 --- a/nuttx/configs/pjrc-8051/defconfig +++ b/nuttx/configs/pjrc-8051/defconfig @@ -236,9 +236,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig index 3a70e23f3..9660d737a 100644 --- a/nuttx/configs/qemu-i486/nsh/defconfig +++ b/nuttx/configs/qemu-i486/nsh/defconfig @@ -297,9 +297,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # General build options diff --git a/nuttx/configs/qemu-i486/ostest/defconfig b/nuttx/configs/qemu-i486/ostest/defconfig index 140dc9032..1de263651 100644 --- a/nuttx/configs/qemu-i486/ostest/defconfig +++ b/nuttx/configs/qemu-i486/ostest/defconfig @@ -213,9 +213,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # General build options diff --git a/nuttx/configs/sam3u-ek/kernel/Makefile b/nuttx/configs/sam3u-ek/kernel/Makefile index 38abe2b0a..5f7d939b2 100755 --- a/nuttx/configs/sam3u-ek/kernel/Makefile +++ b/nuttx/configs/sam3u-ek/kernel/Makefile @@ -88,14 +88,20 @@ $(BOARD_INCLUDE)/user_map.h: $(TOPDIR)/User.map @echo "/* General memory map */" >> $(BOARD_INCLUDE)/user_map.h @echo "" >> $(BOARD_INCLUDE)/user_map.h @echo "#define CONFIG_USER_ENTRYPOINT 0x`grep \" user_start$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h - @echo "#define CONFIG_USER_DATASOURCE 0x`grep \" _eronly$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h - @echo "#define CONFIG_USER_DATADESTSTART 0x`grep \" _sdata$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h - @echo "#define CONFIG_USER_DATADESTEND 0x`grep \" _edata$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_DATASOURCE 0x`grep \" _eronly$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_DATADESTSTART 0x`grep \" _sdata$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_DATADESTEND 0x`grep \" _edata$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h @echo "" >> $(BOARD_INCLUDE)/user_map.h @echo "/* Memory manager entry points */" >> $(BOARD_INCLUDE)/user_map.h @echo "" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_MMINIT 0x`grep \" mm_initialize$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_MMADDREGION 0x`grep \" mm_addregion$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_TRYSEM 0x`grep \" mm_trysemaphore$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_GIVSEM 0x`grep \" mm_givesemaphore$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "" >> $(BOARD_INCLUDE)/user_map.h @echo "#define CONFIG_USER_MALLOC 0x`grep \" malloc$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h @echo "#define CONFIG_USER_REALLOC 0x`grep \" realloc$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_ZALLOC 0x`grep \" zalloc$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h @echo "#define CONFIG_USER_FREE 0x`grep \" free$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h @echo "" >> $(BOARD_INCLUDE)/user_map.h @echo "#endif /* __ARCH_BOARD_USER_MAP_H */" >> $(BOARD_INCLUDE)/user_map.h diff --git a/nuttx/configs/sam3u-ek/kernel/kernel.ld b/nuttx/configs/sam3u-ek/kernel/kernel.ld index 267963978..b15188787 100644 --- a/nuttx/configs/sam3u-ek/kernel/kernel.ld +++ b/nuttx/configs/sam3u-ek/kernel/kernel.ld @@ -70,8 +70,14 @@ EXTERN(user_start) # Currently, the plan is that the memory manager will reside in user-space # but be usable both by kernel- and user-space code +EXTERN(mm_initialize) +EXTERN(mm_addregion) +EXTERN(mm_trysemaphore) +EXTERN(mm_givesemaphore) + EXTERN(malloc) EXTERN(realloc) +EXTERN(zalloc) EXTERN(free) OUTPUT_ARCH(arm) diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index 6602685c5..b2bed075a 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -397,9 +397,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index 5e44d5fe5..d1b271e28 100755 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -370,9 +370,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index 6c11f93ae..f06c2c234 100755 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -371,9 +371,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index f5991cdc5..a90e7cc7a 100755 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -371,9 +371,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/sim/mount/defconfig b/nuttx/configs/sim/mount/defconfig index f829db30c..9738f8cbd 100644 --- a/nuttx/configs/sim/mount/defconfig +++ b/nuttx/configs/sim/mount/defconfig @@ -185,9 +185,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # General build options diff --git a/nuttx/configs/sim/nettest/defconfig b/nuttx/configs/sim/nettest/defconfig index 378a0cf3e..88e899f61 100644 --- a/nuttx/configs/sim/nettest/defconfig +++ b/nuttx/configs/sim/nettest/defconfig @@ -185,9 +185,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # General build options diff --git a/nuttx/configs/sim/nsh/defconfig b/nuttx/configs/sim/nsh/defconfig index 5bc0c34c7..7cd746c6e 100644 --- a/nuttx/configs/sim/nsh/defconfig +++ b/nuttx/configs/sim/nsh/defconfig @@ -185,9 +185,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # General build options diff --git a/nuttx/configs/sim/nx/defconfig b/nuttx/configs/sim/nx/defconfig index f2d13ac0e..2d5825f51 100644 --- a/nuttx/configs/sim/nx/defconfig +++ b/nuttx/configs/sim/nx/defconfig @@ -193,9 +193,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # General build options diff --git a/nuttx/configs/sim/nx/defconfig-x11 b/nuttx/configs/sim/nx/defconfig-x11 index f53d6c1b5..ec90d0181 100644 --- a/nuttx/configs/sim/nx/defconfig-x11 +++ b/nuttx/configs/sim/nx/defconfig-x11 @@ -193,9 +193,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # General build options diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig index 7c998e847..f970524f5 100644 --- a/nuttx/configs/sim/ostest/defconfig +++ b/nuttx/configs/sim/ostest/defconfig @@ -185,9 +185,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n ## # General build options diff --git a/nuttx/configs/sim/pashello/defconfig b/nuttx/configs/sim/pashello/defconfig index f697e247d..082bd66a0 100644 --- a/nuttx/configs/sim/pashello/defconfig +++ b/nuttx/configs/sim/pashello/defconfig @@ -185,9 +185,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # General build options diff --git a/nuttx/configs/skp16c26/ostest/defconfig b/nuttx/configs/skp16c26/ostest/defconfig index 1b611c63c..363c9a432 100644 --- a/nuttx/configs/skp16c26/ostest/defconfig +++ b/nuttx/configs/skp16c26/ostest/defconfig @@ -283,9 +283,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig index 78da2fa7e..b802ef9f4 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/defconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig @@ -394,9 +394,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig index 384a96a1a..2ec1edc33 100755 --- a/nuttx/configs/stm3210e-eval/nsh/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh/defconfig @@ -403,9 +403,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index 9a4a8bb0a..8df5955cb 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -405,9 +405,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index e4b640ea0..78d2f9472 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -406,9 +406,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig index 48b4480e4..2f407ee96 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig @@ -405,9 +405,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig index 768a83d5f..eb023ecb2 100644 --- a/nuttx/configs/us7032evb1/nsh/defconfig +++ b/nuttx/configs/us7032evb1/nsh/defconfig @@ -287,9 +287,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig index 06326b2ab..40cd908f9 100644 --- a/nuttx/configs/us7032evb1/ostest/defconfig +++ b/nuttx/configs/us7032evb1/ostest/defconfig @@ -287,9 +287,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index b51342cb5..916ff5d9e 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -446,9 +446,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig index 9fdcc5237..ec73f289f 100644 --- a/nuttx/configs/xtrs/nsh/defconfig +++ b/nuttx/configs/xtrs/nsh/defconfig @@ -232,9 +232,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/xtrs/ostest/defconfig b/nuttx/configs/xtrs/ostest/defconfig index e06787636..00c7cf090 100644 --- a/nuttx/configs/xtrs/ostest/defconfig +++ b/nuttx/configs/xtrs/ostest/defconfig @@ -232,9 +232,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/xtrs/pashello/defconfig b/nuttx/configs/xtrs/pashello/defconfig index b5e4a68b0..942d7f732 100644 --- a/nuttx/configs/xtrs/pashello/defconfig +++ b/nuttx/configs/xtrs/pashello/defconfig @@ -232,9 +232,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig index a1d304ed7..b84cc5040 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/defconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig @@ -260,9 +260,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig index 6103d8236..c253f9aaa 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/defconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig @@ -260,9 +260,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig index ad71864ef..58b1538b1 100644 --- a/nuttx/configs/z80sim/nsh/defconfig +++ b/nuttx/configs/z80sim/nsh/defconfig @@ -222,9 +222,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/z80sim/ostest/defconfig b/nuttx/configs/z80sim/ostest/defconfig index 32db98607..80bad0681 100644 --- a/nuttx/configs/z80sim/ostest/defconfig +++ b/nuttx/configs/z80sim/ostest/defconfig @@ -222,9 +222,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig index 6c5d3724a..4f0a2ef0f 100644 --- a/nuttx/configs/z80sim/pashello/defconfig +++ b/nuttx/configs/z80sim/pashello/defconfig @@ -222,9 +222,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig index 6d89cca84..0b87b751b 100644 --- a/nuttx/configs/z8encore000zco/ostest/defconfig +++ b/nuttx/configs/z8encore000zco/ostest/defconfig @@ -256,9 +256,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig index d814d7fcc..c552987bc 100644 --- a/nuttx/configs/z8f64200100kit/ostest/defconfig +++ b/nuttx/configs/z8f64200100kit/ostest/defconfig @@ -256,9 +256,6 @@ CONFIG_ARCH_STRNCPY=n CONFIG_ARCH_STRLEN=n CONFIG_ARCH_STRNLEN=n CONFIG_ARCH_BZERO=n -CONFIG_ARCH_KMALLOC=n -CONFIG_ARCH_KZMALLOC=n -CONFIG_ARCH_KFREE=n # # Sizes of configurable things (0 disables) diff --git a/nuttx/include/nuttx/kmalloc.h b/nuttx/include/nuttx/kmalloc.h index 7fb37a5d0..08b1b319b 100644 --- a/nuttx/include/nuttx/kmalloc.h +++ b/nuttx/include/nuttx/kmalloc.h @@ -43,12 +43,16 @@ #include #include +#ifndef CONFIG_NUTTX_KERNEL +# include +#endif + /**************************************************************************** * Public Types ****************************************************************************/ /**************************************************************************** - * Public Function Prototypes + * Public Data ****************************************************************************/ #undef KMALLOC_EXTERN @@ -59,32 +63,29 @@ extern "C" { # define KMALLOC_EXTERN extern #endif -#ifndef CONFIG_ARCH_KMALLOC -# include -# define kmalloc(s) malloc(s) -#else -KMALLOC_EXTERN FAR void *kmalloc(size_t); -#endif +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ -#ifndef CONFIG_ARCH_KZALLOC -# include -# define kzalloc(s) zalloc(s) -#else -KMALLOC_EXTERN FAR void *kzalloc(size_t); -#endif +/* For a monolithic, kernel-mode NuttX build. Special allocators must be + * used. Otherwise, the standard allocators prototyped in stdlib.h may + * be used for both the kernel- and user-mode objects. + */ -#ifndef CONFIG_ARCH_KREALLOC -# include -# define krealloc(p,s) realloc(p,s) -#else -KMALLOC_EXTERN FAR void *krealloc(FAR void*, size_t); -#endif +#ifndef CONFIG_NUTTX_KERNEL -#ifndef CONFIG_ARCH_KFREE -# include +# define kmalloc(s) malloc(s) +# define kzalloc(s) zalloc(s) +# define krealloc(p,s) realloc(p,s) # define kfree(p) free(p) + #else + +KMALLOC_EXTERN FAR void *kmalloc(size_t); +KMALLOC_EXTERN FAR void *kzalloc(size_t); +KMALLOC_EXTERN FAR void *krealloc(FAR void*, size_t); KMALLOC_EXTERN void kfree(FAR void*); + #endif /* Functions defined in os_list.c *******************************************/ diff --git a/nuttx/sched/Makefile b/nuttx/sched/Makefile index f5d2ce9db..f164630bf 100644 --- a/nuttx/sched/Makefile +++ b/nuttx/sched/Makefile @@ -134,6 +134,8 @@ endif IRQ_SRCS = irq_initialize.c irq_attach.c irq_dispatch.c irq_unexpectedisr.c +KMM_SRCS = kmm_kmalloc.c kmm_kzalloc.c kmm_krealloc.c kmm_kfree.c + CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) $(WDOG_SRCS) $(TIME_SRCS) \ $(SEM_SRCS) $(TIMER_SRCS) $(WORK_SRCS) $(PGFILL_SRCS) $(IRQ_SRCS) @@ -152,6 +154,10 @@ endif ifneq ($(CONFIG_DISABLE_ENVIRON),y) CSRCS += $(ENV_SRCS) endif +ifeq ($(CONFIG_NUTTX_KERNEL),y) +CSRCS += $(KMM_SRCS) +endif + COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) diff --git a/nuttx/sched/env_putenv.c b/nuttx/sched/env_putenv.c index 65c3d4c03..68674023a 100644 --- a/nuttx/sched/env_putenv.c +++ b/nuttx/sched/env_putenv.c @@ -41,6 +41,7 @@ #ifndef CONFIG_DISABLE_ENVIRON +#include #include #include #include diff --git a/nuttx/sched/env_setenv.c b/nuttx/sched/env_setenv.c index 8193aa564..bc1ff33b1 100644 --- a/nuttx/sched/env_setenv.c +++ b/nuttx/sched/env_setenv.c @@ -42,6 +42,7 @@ #ifndef CONFIG_DISABLE_ENVIRON #include +#include #include #include #include diff --git a/nuttx/sched/kmm_kfree.c b/nuttx/sched/kmm_kfree.c new file mode 100644 index 000000000..0370ce8ee --- /dev/null +++ b/nuttx/sched/kmm_kfree.c @@ -0,0 +1,110 @@ +/************************************************************************ + * sched/kmm_kfree.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************/ + +/************************************************************************ + * Included Files + ************************************************************************/ + +#include +#include + +#ifdef CONFIG_NUTTX_KERNEL + +/* This logic is all tentatively and, hopefully, will grow in usability. + * For now, the kernel-mode build uses the memory manager that is + * provided in the user-space build. That is awkward but reasonable for + * the current level of support: At present, only memory protection is + * provided. Kernel-mode code may call into user-mode code, but not + * vice-versa. So hosting the memory manager in user-space allows the + * memory manager to be shared in both kernel- and user-mode spaces. + * + * In the longer run, if an MMU is support that can provide virtualized + * memory, then some SLAB memory manager will be required in kernel-space + * with some kind of brk() system call to obtain mapped heap space. + * + * In the current build model, the user-space module is built first. The + * file user_map.h is generated in the first pass and contains the + * addresses of the memory manager needed in this file: + */ + +#include + +/************************************************************************ + * Pre-processor definition + ************************************************************************/ + +/* This value is obtained from user_map.h */ + +#define KFREE(p) ((kfree_t)CONFIG_USER_FREE)(p) + +/************************************************************************ + * Private Types + ************************************************************************/ + +typedef void (*kfree_t)(FAR void *); + +/************************************************************************ + * Private Functions + ************************************************************************/ + +/************************************************************************ + * Public Functions + ************************************************************************/ + +/************************************************************************ + * Function: kfree + * + * Description: + * This is a simple redirection to the user-space free() function. + * + * Parameters: + * None + * + * Return Value: + * None + * + * Assumptions: + * 1. free() resides in user-space + * 2. The address of the user space free() is provided in user_map.h + * 3. The user-space free() is callable from kernel-space. + * + ************************************************************************/ + +void free(FAR void *mem) +{ + return KFREE(mem); +} + +#endif /* CONFIG_NUTTX_KERNEL */ diff --git a/nuttx/sched/kmm_kmalloc.c b/nuttx/sched/kmm_kmalloc.c new file mode 100644 index 000000000..01267ab48 --- /dev/null +++ b/nuttx/sched/kmm_kmalloc.c @@ -0,0 +1,110 @@ +/************************************************************************ + * sched/kmm_kmalloc.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************/ + +/************************************************************************ + * Included Files + ************************************************************************/ + +#include +#include + +#ifdef CONFIG_NUTTX_KERNEL + +/* This logic is all tentatively and, hopefully, will grow in usability. + * For now, the kernel-mode build uses the memory manager that is + * provided in the user-space build. That is awkward but reasonable for + * the current level of support: At present, only memory protection is + * provided. Kernel-mode code may call into user-mode code, but not + * vice-versa. So hosting the memory manager in user-space allows the + * memory manager to be shared in both kernel- and user-mode spaces. + * + * In the longer run, if an MMU is support that can provide virtualized + * memory, then some SLAB memory manager will be required in kernel-space + * with some kind of brk() system call to obtain mapped heap space. + * + * In the current build model, the user-space module is built first. The + * file user_map.h is generated in the first pass and contains the + * addresses of the memory manager needed in this file: + */ + +#include + +/************************************************************************ + * Pre-processor definition + ************************************************************************/ + +/* This value is obtained from user_map.h */ + +#define KMALLOC(s) ((kmalloc_t)CONFIG_USER_MALLOC)(s) + +/************************************************************************ + * Private Types + ************************************************************************/ + +typedef FAR void *(*kmalloc_t)(size_t); + +/************************************************************************ + * Private Functions + ************************************************************************/ + +/************************************************************************ + * Public Functions + ************************************************************************/ + +/************************************************************************ + * Function: kmalloc + * + * Description: + * This is a simple redirection to the user-space malloc() function. + * + * Parameters: + * None + * + * Return Value: + * The address of the allocated memory (NULL on failure to allocate) + * + * Assumptions: + * 1. malloc() resides in user-space + * 2. The address of the user space malloc() is provided in user_map.h + * 3. The user-space malloc() is callable from kernel-space. + * + ************************************************************************/ + +FAR void *kmalloc(size_t size) +{ + return KMALLOC(size); +} + +#endif /* CONFIG_NUTTX_KERNEL */ diff --git a/nuttx/sched/kmm_krealloc.c b/nuttx/sched/kmm_krealloc.c new file mode 100644 index 000000000..b52d86499 --- /dev/null +++ b/nuttx/sched/kmm_krealloc.c @@ -0,0 +1,110 @@ +/************************************************************************ + * sched/kmm_krealloc.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************/ + +/************************************************************************ + * Included Files + ************************************************************************/ + +#include +#include + +#ifdef CONFIG_NUTTX_KERNEL + +/* This logic is all tentatively and, hopefully, will grow in usability. + * For now, the kernel-mode build uses the memory manager that is + * provided in the user-space build. That is awkward but reasonable for + * the current level of support: At present, only memory protection is + * provided. Kernel-mode code may call into user-mode code, but not + * vice-versa. So hosting the memory manager in user-space allows the + * memory manager to be shared in both kernel- and user-mode spaces. + * + * In the longer run, if an MMU is support that can provide virtualized + * memory, then some SLAB memory manager will be required in kernel-space + * with some kind of brk() system call to obtain mapped heap space. + * + * In the current build model, the user-space module is built first. The + * file user_map.h is generated in the first pass and contains the + * addresses of the memory manager needed in this file: + */ + +#include + +/************************************************************************ + * Pre-processor definition + ************************************************************************/ + +/* This value is obtained from user_map.h */ + +#define KREALLOC(p,s) ((krealloc_t)CONFIG_USER_REALLOC)(p,s) + +/************************************************************************ + * Private Types + ************************************************************************/ + +typedef FAR void *(*krealloc_t)(FAR void*, size_t); + +/************************************************************************ + * Private Functions + ************************************************************************/ + +/************************************************************************ + * Public Functions + ************************************************************************/ + +/************************************************************************ + * Function: krealloc + * + * Description: + * This is a simple redirection to the user-space realloc() function. + * + * Parameters: + * None + * + * Return Value: + * The address of the re-allocated memory (NULL on failure to re-allocate) + * + * Assumptions: + * 1. realloc() resides in user-space + * 2. The address of the user space realloc() is provided in user_map.h + * 3. The user-space realloc() is callable from kernel-space. + * + ************************************************************************/ + +FAR void *krealloc(FAR void *oldmem, size_t size) +{ + return KREALLOC(oldmem, size); +} + +#endif /* CONFIG_NUTTX_KERNEL */ diff --git a/nuttx/sched/kmm_kzalloc.c b/nuttx/sched/kmm_kzalloc.c new file mode 100644 index 000000000..567cd37d4 --- /dev/null +++ b/nuttx/sched/kmm_kzalloc.c @@ -0,0 +1,110 @@ +/************************************************************************ + * sched/kmm_kzalloc.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************/ + +/************************************************************************ + * Included Files + ************************************************************************/ + +#include +#include + +#ifdef CONFIG_NUTTX_KERNEL + +/* This logic is all tentatively and, hopefully, will grow in usability. + * For now, the kernel-mode build uses the memory manager that is + * provided in the user-space build. That is awkward but reasonable for + * the current level of support: At present, only memory protection is + * provided. Kernel-mode code may call into user-mode code, but not + * vice-versa. So hosting the memory manager in user-space allows the + * memory manager to be shared in both kernel- and user-mode spaces. + * + * In the longer run, if an MMU is support that can provide virtualized + * memory, then some SLAB memory manager will be required in kernel-space + * with some kind of brk() system call to obtain mapped heap space. + * + * In the current build model, the user-space module is built first. The + * file user_map.h is generated in the first pass and contains the + * addresses of the memory manager needed in this file: + */ + +#include + +/************************************************************************ + * Pre-processor definition + ************************************************************************/ + +/* This value is obtained from user_map.h */ + +#define KZALLOC(s) ((kzalloc_t)CONFIG_USER_ZALLOC)(s) + +/************************************************************************ + * Private Types + ************************************************************************/ + +typedef FAR void *(*kzalloc_t)(size_t); + +/************************************************************************ + * Private Functions + ************************************************************************/ + +/************************************************************************ + * Public Functions + ************************************************************************/ + +/************************************************************************ + * Function: kzalloc + * + * Description: + * This is a simple redirection to the user-space zalloc() function. + * + * Parameters: + * None + * + * Return Value: + * The address of the allocated memory (NULL on failure to allocate) + * + * Assumptions: + * 1. zalloc() resides in user-space + * 2. The address of the user space zalloc() is provided in user_map.h + * 3. The user-space zalloc() is callable from kernel-space. + * + ************************************************************************/ + +FAR void *kzalloc(size_t size) +{ + return KZALLOC(size); +} + +#endif /* CONFIG_NUTTX_KERNEL */ diff --git a/nuttx/sched/task_delete.c b/nuttx/sched/task_delete.c index 683fbd18d..4fd49a4ea 100644 --- a/nuttx/sched/task_delete.c +++ b/nuttx/sched/task_delete.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/task_delete.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -37,11 +37,13 @@ * Included Files ****************************************************************************/ -#include +#include -#include -#include -#include "os_internal.h" +#include +#include +#include + +#include "os_internal.h" #ifndef CONFIG_DISABLE_SIGNALS # include "sig_internal.h" #endif diff --git a/nuttx/sched/timer_delete.c b/nuttx/sched/timer_delete.c index d4a24fca3..e89dd15a1 100644 --- a/nuttx/sched/timer_delete.c +++ b/nuttx/sched/timer_delete.c @@ -38,6 +38,7 @@ ********************************************************************************/ #include + #include #include -- cgit v1.2.3