More changes for a kernel-mode allocator (more to be done)

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5724 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2013-03-09 21:12:20 +00:00
parent 43d8762499
commit 1c52dce216
264 changed files with 1277 additions and 1648 deletions

View File

@ -1870,14 +1870,11 @@ The system can be re-made subsequently by just typing <code>make</code>.
<p><b>Prototype</b>: <code>void up_allocate_heap(FAR void **heap_start, size_t *heap_size);</code></p> <p><b>Prototype</b>: <code>void up_allocate_heap(FAR void **heap_start, size_t *heap_size);</code></p>
<p><b>Description</b>. <p><b>Description</b>.
The heap may be statically allocated by This function will be called to dynamically set aside the heap region.
defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these
are not defined, then this function will be called to
dynamically set aside the heap region.
</p> </p>
<p> <p>
This API is <i>NOT</i> required if <code>CONFIG_HEAP_BASE</code> For the kernel build (<code>CONFIG_NUTTX_KERNEL</code>=y) with both kernel- and user-space heaps (<code>CONFIG_MM_KERNEL_HEAP</code>=y), this function provides the size of the unprotected, user-space heap.
is defined. If a protected kernel-space heap is provided, the kernel heap must be allocated (and protected) by an analogous <code>up_allocate_kheap()</code>.
</p> </p>
<h3><a name="upinterruptcontext">4.1.15 <code>up_interrupt_context()</code></a></h3> <h3><a name="upinterruptcontext">4.1.15 <code>up_interrupt_context()</code></a></h3>
@ -6551,12 +6548,6 @@ int ret = sigaction(SIGCHLD, &sa, NULL);
<li> <li>
<code>CONFIG_PTHREAD_STACK_DEFAULT</code>: Default pthread stack size <code>CONFIG_PTHREAD_STACK_DEFAULT</code>: Default pthread stack size
</li> </li>
<li>
<code>CONFIG_HEAP_BASE</code>: The beginning of the heap
</li>
<li>
<code>CONFIG_HEAP_SIZE</code>: The size of the heap
</li>
</ul> </ul>
<table width ="100%"> <table width ="100%">

View File

@ -70,10 +70,8 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these * the heap region.
* are not defined, then this function will be called to
* dynamically set aside the heap region.
* *
************************************************************/ ************************************************************/

View File

@ -68,10 +68,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************ /************************************************************
* dm320/dm320_allocateheap.c * dm320/dm320_allocateheap.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -68,10 +68,17 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these * the heap region.
* are not defined, then this function will be called to *
* dynamically set aside the heap region. * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both
* kernel- and user-space heaps (CONFIG_MM_KERNEL_HEAP=y),
* this function provides the size of the unprotected,
* user-space heap.
*
* If a protected kernel-space heap is provided, the kernel
* heap must be allocated (and protected) by an analogous
* up_allocate_kheap().
* *
************************************************************/ ************************************************************/

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/dm320/dm320_framebuffer.c * arch/arm/src/dm320/dm320_framebuffer.c
* *
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Copyright (C) 2008-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -46,6 +46,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/fb.h> #include <nuttx/fb.h>
#include <nuttx/kmalloc.h>
#include <nuttx/nx/nxglib.h> #include <nuttx/nx/nxglib.h>
#include "up_arch.h" #include "up_arch.h"
@ -674,10 +675,10 @@ static int dm320_allocvideomemory(void)
{ {
#ifndef CONFIG_DM320_VID0_DISABLE #ifndef CONFIG_DM320_VID0_DISABLE
#ifndef CONFIG_DM320_DISABLE_PINGPONG #ifndef CONFIG_DM320_DISABLE_PINGPONG
g_vid0base = (FAR void *)malloc(2 * DM320_VID0_FBLEN); g_vid0base = (FAR void *)kmalloc(2 * DM320_VID0_FBLEN);
g_vid0ppbase = (FAR char*)g_vid0base + DM320_VID0_FBLEN; g_vid0ppbase = (FAR char*)g_vid0base + DM320_VID0_FBLEN;
#else #else
g_vid0base = (FAR void *)malloc(DM320_VID0_FBLEN); g_vid0base = (FAR void *)kmalloc(DM320_VID0_FBLEN);
#endif #endif
if (!g_vid0base) if (!g_vid0base)
{ {
@ -686,7 +687,7 @@ static int dm320_allocvideomemory(void)
#endif #endif
#ifndef CONFIG_DM320_VID1_DISABLE #ifndef CONFIG_DM320_VID1_DISABLE
g_vid1base = (FAR void *)malloc(DM320_VID1_FBLEN); g_vid1base = (FAR void *)kmalloc(DM320_VID1_FBLEN);
if (!g_vid1base) if (!g_vid1base)
{ {
goto errout; goto errout;
@ -694,7 +695,7 @@ static int dm320_allocvideomemory(void)
#endif #endif
#ifndef CONFIG_DM320_OSD0_DISABLE #ifndef CONFIG_DM320_OSD0_DISABLE
g_osd0base = (FAR void *)malloc(DM320_OSD0_FBLEN); g_osd0base = (FAR void *)kmalloc(DM320_OSD0_FBLEN);
if (!g_osd0base) if (!g_osd0base)
{ {
goto errout; goto errout;
@ -702,7 +703,7 @@ static int dm320_allocvideomemory(void)
#endif #endif
#ifndef CONFIG_DM320_OSD1_DISABLE #ifndef CONFIG_DM320_OSD1_DISABLE
g_osd1base = (FAR void *)malloc(DM320_OSD1_FBLEN); g_osd1base = (FAR void *)kmalloc(DM320_OSD1_FBLEN);
if (!g_osd1base) if (!g_osd1base)
{ {
goto errout; goto errout;
@ -725,7 +726,7 @@ static void dm320_freevideomemory(void)
#ifndef CONFIG_DM320_VID0_DISABLE #ifndef CONFIG_DM320_VID0_DISABLE
if (g_vid0base) if (g_vid0base)
{ {
free(g_vid0base); kfree(g_vid0base);
g_vid0base = NULL; g_vid0base = NULL;
#ifndef CONFIG_DM320_DISABLE_PINGPONG #ifndef CONFIG_DM320_DISABLE_PINGPONG
g_vid0ppbase = NULL; g_vid0ppbase = NULL;
@ -736,7 +737,7 @@ static void dm320_freevideomemory(void)
#ifndef CONFIG_DM320_VID1_DISABLE #ifndef CONFIG_DM320_VID1_DISABLE
if (g_vid1base != 0) if (g_vid1base != 0)
{ {
free(g_vid1base); kfree(g_vid1base);
g_vid1base = NULL; g_vid1base = NULL;
} }
#endif #endif
@ -744,7 +745,7 @@ static void dm320_freevideomemory(void)
#ifndef CONFIG_DM320_OSD0_DISABLE #ifndef CONFIG_DM320_OSD0_DISABLE
if (g_osd0base != 0) if (g_osd0base != 0)
{ {
free(g_osd0base); kfree(g_osd0base);
g_osd0base = NULL; g_osd0base = NULL;
} }
#endif #endif
@ -752,7 +753,7 @@ static void dm320_freevideomemory(void)
#ifndef CONFIG_DM320_OSD1_DISABLE #ifndef CONFIG_DM320_OSD1_DISABLE
if (g_osd1base != 0) if (g_osd1base != 0)
{ {
free(g_osd1base); kfree(g_osd1base);
g_osd1base = NULL; g_osd1base = NULL;
} }
#endif #endif

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
* arch/arm/src/dm320/dm320_usbdev.c * arch/arm/src/dm320/dm320_usbdev.c
* *
* Copyright (C) 2008-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2008-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -48,6 +48,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -1936,7 +1937,7 @@ static FAR struct usbdev_req_s *dm320_epallocreq(FAR struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, ((FAR struct dm320_ep_s *)ep)->epphy); usbtrace(TRACE_EPALLOCREQ, ((FAR struct dm320_ep_s *)ep)->epphy);
privreq = (FAR struct dm320_req_s *)malloc(sizeof(struct dm320_req_s)); privreq = (FAR struct dm320_req_s *)kmalloc(sizeof(struct dm320_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(DM320_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(DM320_TRACEERR_ALLOCFAIL), 0);
@ -1968,7 +1969,7 @@ static void dm320_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct dm320_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct dm320_ep_s *)ep)->epphy);
free(privreq); kfree(privreq);
} }
/******************************************************************************* /*******************************************************************************
@ -1987,7 +1988,7 @@ static void *dm320_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
return usbdev_dma_alloc(bytes); return usbdev_dma_alloc(bytes);
#else #else
return malloc(bytes); return kmalloc(bytes);
#endif #endif
} }
#endif #endif
@ -2008,7 +2009,7 @@ static void dm320_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
free(buf); kfree(buf);
#endif #endif
} }
#endif #endif

View File

@ -72,9 +72,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by defining CONFIG_HEAP_BASE and * This function will be called to dynamically set aside the heap region.
* CONFIG_HEAP_SIZE. If these are not defined, then this function will be *
* called to dynamically set aside the heap region. * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -182,10 +182,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -48,6 +48,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -2658,7 +2659,7 @@ static FAR struct usbdev_req_s *lpc17_epallocreq(FAR struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc17_ep_s *)ep)->epphy); usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc17_ep_s *)ep)->epphy);
privreq = (FAR struct lpc17_req_s *)malloc(sizeof(struct lpc17_req_s)); privreq = (FAR struct lpc17_req_s *)kmalloc(sizeof(struct lpc17_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_ALLOCFAIL), 0);
@ -2690,7 +2691,7 @@ static void lpc17_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc17_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc17_ep_s *)ep)->epphy);
free(privreq); kfree(privreq);
} }
/******************************************************************************* /*******************************************************************************
@ -2711,7 +2712,7 @@ static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes
usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); usbtrace(TRACE_EPALLOCBUFFER, privep->epphy);
/* Find a free DMA description */ /* Find a free DMA description */
#error "LOGIC INCOMPLETE" #error "LOGIC INCOMPLETE"
@ -2728,7 +2729,7 @@ static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes
#else #else
usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); usbtrace(TRACE_EPALLOCBUFFER, privep->epphy);
return malloc(bytes); return kmalloc(bytes);
#endif #endif
} }
@ -2767,7 +2768,7 @@ static void lpc17_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#else #else
usbtrace(TRACE_EPFREEBUFFER, privep->epphy); usbtrace(TRACE_EPFREEBUFFER, privep->epphy);
free(buf); kfree(buf);
#endif #endif
} }

View File

@ -48,6 +48,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -2622,7 +2623,7 @@ static FAR struct usbdev_req_s *lpc214x_epallocreq(FAR struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy); usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy);
privreq = (FAR struct lpc214x_req_s *)malloc(sizeof(struct lpc214x_req_s)); privreq = (FAR struct lpc214x_req_s *)kmalloc(sizeof(struct lpc214x_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_ALLOCFAIL), 0);
@ -2654,7 +2655,7 @@ static void lpc214x_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy);
free(privreq); kfree(privreq);
} }
/******************************************************************************* /*******************************************************************************
@ -2675,7 +2676,7 @@ static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbyt
usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); usbtrace(TRACE_EPALLOCBUFFER, privep->epphy);
/* Find a free DMA description */ /* Find a free DMA description */
#error "LOGIC INCOMPLETE" #error "LOGIC INCOMPLETE"
@ -2692,7 +2693,7 @@ static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbyt
#else #else
usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); usbtrace(TRACE_EPALLOCBUFFER, privep->epphy);
return malloc(bytes); return kmalloc(bytes);
#endif #endif
} }
@ -2731,7 +2732,7 @@ static void lpc214x_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#else #else
usbtrace(TRACE_EPFREEBUFFER, privep->epphy); usbtrace(TRACE_EPFREEBUFFER, privep->epphy);
free(buf); kfree(buf);
#endif #endif
} }

View File

@ -157,10 +157,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by defining CONFIG_HEAP_BASE * This function will be called to dynamically set aside the heap region.
* and CONFIG_HEAP_SIZE. If these are not defined, then this function *
* will be called to dynamically set aside the heap region to the end * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* of SRAM. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
* SRAM layout: * SRAM layout:
* Start of SRAM: .data * Start of SRAM: .data

View File

@ -53,6 +53,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -1949,7 +1950,7 @@ static FAR struct usbdev_req_s *lpc31_epallocreq(FAR struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc31_ep_s *)ep)->epphy); usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc31_ep_s *)ep)->epphy);
privreq = (FAR struct lpc31_req_s *)malloc(sizeof(struct lpc31_req_s)); privreq = (FAR struct lpc31_req_s *)kmalloc(sizeof(struct lpc31_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_ALLOCFAIL), 0);
@ -1981,7 +1982,7 @@ static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc31_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc31_ep_s *)ep)->epphy);
free(privreq); kfree(privreq);
} }
/******************************************************************************* /*******************************************************************************
@ -2000,7 +2001,7 @@ static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
return usbdev_dma_alloc(bytes); return usbdev_dma_alloc(bytes);
#else #else
return malloc(bytes); return kmalloc(bytes);
#endif #endif
} }
#endif #endif
@ -2021,7 +2022,7 @@ static void lpc31_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
free(buf); kfree(buf);
#endif #endif
} }
#endif #endif

View File

@ -228,10 +228,14 @@ const uint32_t g_heapbase = (uint32_t)&_ebss + CONFIG_IDLETHREAD_STACKSIZE;
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -58,6 +58,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -1949,7 +1950,7 @@ static FAR struct usbdev_req_s *lpc43_epallocreq(FAR struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc43_ep_s *)ep)->epphy); usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc43_ep_s *)ep)->epphy);
privreq = (FAR struct lpc43_req_s *)malloc(sizeof(struct lpc43_req_s)); privreq = (FAR struct lpc43_req_s *)kmalloc(sizeof(struct lpc43_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_ALLOCFAIL), 0);
@ -1981,7 +1982,7 @@ static void lpc43_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc43_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc43_ep_s *)ep)->epphy);
free(privreq); kfree(privreq);
} }
/******************************************************************************* /*******************************************************************************
@ -2000,7 +2001,7 @@ static void *lpc43_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
return usbdev_dma_alloc(bytes); return usbdev_dma_alloc(bytes);
#else #else
return malloc(bytes); return kmalloc(bytes);
#endif #endif
} }
#endif #endif
@ -2021,7 +2022,7 @@ static void lpc43_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
free(buf); kfree(buf);
#endif #endif
} }
#endif #endif

View File

@ -94,10 +94,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -356,10 +356,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -48,6 +48,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -4230,7 +4231,7 @@ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, ((FAR struct stm32_ep_s *)ep)->epphy); usbtrace(TRACE_EPALLOCREQ, ((FAR struct stm32_ep_s *)ep)->epphy);
privreq = (FAR struct stm32_req_s *)malloc(sizeof(struct stm32_req_s)); privreq = (FAR struct stm32_req_s *)kmalloc(sizeof(struct stm32_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(STM32_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(STM32_TRACEERR_ALLOCFAIL), 0);
@ -4262,7 +4263,7 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct stm32_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct stm32_ep_s *)ep)->epphy);
free(privreq); kfree(privreq);
} }
/******************************************************************************* /*******************************************************************************
@ -4281,7 +4282,7 @@ static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
return usbdev_dma_alloc(bytes); return usbdev_dma_alloc(bytes);
#else #else
return malloc(bytes); return kmalloc(bytes);
#endif #endif
} }
#endif #endif
@ -4302,7 +4303,7 @@ static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
free(buf); kfree(buf);
#endif #endif
} }
#endif #endif

View File

@ -52,6 +52,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -2762,7 +2763,7 @@ static struct usbdev_req_s *stm32_epallocreq(struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog)); usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog));
privreq = (struct stm32_req_s *)malloc(sizeof(struct stm32_req_s)); privreq = (struct stm32_req_s *)kmalloc(sizeof(struct stm32_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(STM32_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(STM32_TRACEERR_ALLOCFAIL), 0);
@ -2790,7 +2791,7 @@ static void stm32_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
#endif #endif
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog)); usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
free(privreq); kfree(privreq);
} }
/**************************************************************************** /****************************************************************************

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
* arch/arm/src/at90usb/at90usb_usbdev.c * arch/arm/src/at90usb/at90usb_usbdev.c
* *
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -48,6 +48,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -2286,7 +2287,7 @@ static FAR struct usbdev_req_s *avr_epallocreq(FAR struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog); usbtrace(TRACE_EPALLOCREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog);
privreq = (FAR struct avr_req_s *)malloc(sizeof(struct avr_req_s)); privreq = (FAR struct avr_req_s *)kmalloc(sizeof(struct avr_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(AVR_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(AVR_TRACEERR_ALLOCFAIL), 0);
@ -2319,7 +2320,7 @@ static void avr_epfreereq(FAR struct usbdev_ep_s *ep,
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog); usbtrace(TRACE_EPFREEREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog);
free(privreq); kfree(privreq);
} }
/******************************************************************************* /*******************************************************************************
@ -2338,7 +2339,7 @@ static void *avr_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
return usbdev_dma_alloc(bytes); return usbdev_dma_alloc(bytes);
#else #else
return malloc(bytes); return kmalloc(bytes);
#endif #endif
} }
#endif #endif
@ -2359,7 +2360,7 @@ static void avr_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
free(buf); kfree(buf);
#endif #endif
} }
#endif #endif

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/avr/src/common/up_allocateheap.c * arch/avr/src/common/up_allocateheap.c
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -68,9 +68,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by defining CONFIG_HEAP_BASE and * This function will be called to dynamically set aside the heap region.
* CONFIG_HEAP_SIZE. If these are not defined, then this function will be *
* called to dynamically set aside the heap region. * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/hc/src/common/up_allocateheap.c * arch/hc/src/common/up_allocateheap.c
* *
* Copyright (C) 2009 Gregory Nutt. All rights reserved. * Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -67,10 +67,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/mips/src/common/up_allocateheap.c * arch/mips/src/common/up_allocateheap.c
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -68,10 +68,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/mips/src/pic32mx/pic32mx_usbdev.c * arch/mips/src/pic32mx/pic32mx_usbdev.c
* *
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* References: * References:
@ -57,6 +57,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#include <nuttx/usb/usb.h> #include <nuttx/usb/usb.h>
#include <nuttx/usb/usbdev.h> #include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
@ -3313,7 +3314,7 @@ static struct usbdev_req_s *pic32mx_epallocreq(struct usbdev_ep_s *ep)
#endif #endif
usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog)); usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog));
privreq = (struct pic32mx_req_s *)malloc(sizeof(struct pic32mx_req_s)); privreq = (struct pic32mx_req_s *)kmalloc(sizeof(struct pic32mx_req_s));
if (!privreq) if (!privreq)
{ {
usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_ALLOCFAIL), 0); usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_ALLOCFAIL), 0);
@ -3341,7 +3342,7 @@ static void pic32mx_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
#endif #endif
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog)); usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
free(privreq); kfree(privreq);
} }
/**************************************************************************** /****************************************************************************

View File

@ -161,7 +161,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
void up_release_stack(struct tcb_s *dtcb) void up_release_stack(struct tcb_s *dtcb)
{ {
if (dtcb->stack_alloc_ptr) { if (dtcb->stack_alloc_ptr) {
free(dtcb->stack_alloc_ptr); kfree(dtcb->stack_alloc_ptr);
} }
dtcb->stack_alloc_ptr = NULL; dtcb->stack_alloc_ptr = NULL;

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/sh/src/common/up_allocateheap.c * arch/sh/src/common/up_allocateheap.c
* *
* Copyright (C) 2008 Gregory Nutt. All rights reserved. * Copyright (C) 2008, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -67,10 +67,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* up_allocateheap.c * up_allocateheap.c
* *
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -71,10 +71,14 @@ static uint8_t sim_heap[SIM_HEAP_SIZE];
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by * This function will be called to dynamically set aside the heap region.
* defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these *
* are not defined, then this function will be called to * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* dynamically set aside the heap region. * user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -43,9 +43,13 @@
# include <zlib.h> # include <zlib.h>
#else #else
# include <nuttx/config.h> # include <nuttx/config.h>
# include <stdlib.h> # include <stdlib.h>
# include <debug.h> # include <debug.h>
# include <zlib.h> # include <zlib.h>
# include <nuttx/kmalloc.h>
# include "up_internal.h" # include "up_internal.h"
#endif #endif
@ -55,6 +59,8 @@
#ifdef VFAT_STANDALONE #ifdef VFAT_STANDALONE
# define sdbg(format, arg...) printf(format, ##arg) # define sdbg(format, arg...) printf(format, ##arg)
# define kmalloc(size) malloc(size)
# define kfree(mem) free(mem)
#endif #endif
/**************************************************************************** /****************************************************************************
@ -224,7 +230,8 @@ char *up_deviceimage(void)
/* Allocate a buffer to hold the decompressed buffer. We may have /* Allocate a buffer to hold the decompressed buffer. We may have
* to reallocate this a few times to get the size right. * to reallocate this a few times to get the size right.
*/ */
pbuffer = (char*)malloc(bufsize);
pbuffer = (char*)kmalloc(bufsize);
/* Set up the input buffer */ /* Set up the input buffer */
@ -253,7 +260,7 @@ char *up_deviceimage(void)
case Z_STREAM_ERROR: case Z_STREAM_ERROR:
sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" ); sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
(void)inflateEnd(&strm); (void)inflateEnd(&strm);
free(pbuffer); kfree(pbuffer);
return NULL; return NULL;
} }
@ -265,10 +272,10 @@ char *up_deviceimage(void)
if (strm.avail_out == 0) if (strm.avail_out == 0)
{ {
int newbufsize = bufsize + 128*1024; int newbufsize = bufsize + 128*1024;
char *newbuffer = realloc(pbuffer, newbufsize); char *newbuffer = krealloc(pbuffer, newbufsize);
if (!newbuffer) if (!newbuffer)
{ {
free(pbuffer); kfree(pbuffer);
return NULL; return NULL;
} }
else else
@ -285,10 +292,10 @@ char *up_deviceimage(void)
*/ */
int newbufsize = bufsize - strm.avail_out; int newbufsize = bufsize - strm.avail_out;
char *newbuffer = realloc(pbuffer, newbufsize); char *newbuffer = krealloc(pbuffer, newbufsize);
if (!newbuffer) if (!newbuffer)
{ {
free(pbuffer); kfree(pbuffer);
return NULL; return NULL;
} }
else else
@ -344,7 +351,7 @@ int main(int argc, char **argv, char **envp)
if (deviceimage) if (deviceimage)
{ {
printf("Inflate SUCCEEDED\n"); printf("Inflate SUCCEEDED\n");
free(deviceimage); kfree(deviceimage);
return 0; return 0;
} }
else else

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/x86/src/common/up_allocateheap.c * arch/x86/src/common/up_allocateheap.c
* *
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -68,9 +68,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by defining CONFIG_HEAP_BASE and * This function will be called to dynamically set aside the heap region.
* CONFIG_HEAP_SIZE. If these are not defined, then this function will be *
* called to dynamically set aside the heap region. * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -83,9 +83,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by defining CONFIG_HEAP_BASE and * This function will be called to dynamically set aside the heap region.
* CONFIG_HEAP_SIZE. If these are not defined, then this function will be *
* called to dynamically set aside the heap region. * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -85,9 +85,14 @@
* Name: up_allocate_heap * Name: up_allocate_heap
* *
* Description: * Description:
* The heap may be statically allocated by defining CONFIG_HEAP_BASE and * This function will be called to dynamically set aside the heap region.
* CONFIG_HEAP_SIZE. If these are not defined, then this function will be *
* called to dynamically set aside the heap region. * For the kernel build (CONFIG_NUTTX_KERNEL=y) with both kernel- and
* user-space heaps (CONFIG_MM_KERNEL_HEAP=y), this function provides the
* size of the unprotected, user-space heap.
*
* If a protected kernel-space heap is provided, the kernel heap must be
* allocated (and protected) by an analogous up_allocate_kheap().
* *
****************************************************************************/ ****************************************************************************/

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/z80/src/ez80/ez80_i2c.c * arch/z80/src/ez80/ez80_i2c.c
* *
* Copyright(C) 2009, 2011 Gregory Nutt. All rights reserved. * Copyright(C) 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -48,6 +48,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/i2c.h> #include <nuttx/i2c.h>
#include <nuttx/kmalloc.h>
#include <arch/io.h> #include <arch/io.h>
#include <arch/board/board.h> #include <arch/board/board.h>
@ -747,10 +748,10 @@ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen)
for (retry = 0; retry < 100; retry++) for (retry = 0; retry < 100; retry++)
{ {
/* Enter MASTER TRANSMIT mode by setting the STA bit in the I2C_CTL /* Enter MASTER TRANSMIT mode by setting the STA bit in the I2C_CTL
* register to 1. The I2C then tests the I2C bus and transmits a START * register to 1. The I2C then tests the I2C bus and transmits a START
* condition when the bus is free. * condition when the bus is free.
*/ */
i2c_start(); i2c_start();
@ -920,7 +921,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port)
/* Now, allocate an I2C instance for this caller */ /* Now, allocate an I2C instance for this caller */
i2c = (FAR struct ez80_i2cdev_s *)malloc(sizeof(FAR struct ez80_i2cdev_s)); i2c = (FAR struct ez80_i2cdev_s *)kmalloc(sizeof(FAR struct ez80_i2cdev_s));
if (i2c) if (i2c)
{ {
/* Initialize the allocated instance */ /* Initialize the allocated instance */

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/z80/src/z8/z8_i2c.c * arch/z80/src/z8/z8_i2c.c
* *
* Copyright(C) 2009, 2011 Gregory Nutt. All rights reserved. * Copyright(C) 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -48,6 +48,7 @@
#include <debug.h> #include <debug.h>
#include <nuttx/i2c.h> #include <nuttx/i2c.h>
#include <nuttx/kmalloc.h>
#include <arch/board/board.h> #include <arch/board/board.h>
#include <eZ8.h> /* eZ8 Register definitions */ #include <eZ8.h> /* eZ8 Register definitions */
@ -592,7 +593,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port)
/* Now, allocate an I2C instance for this caller */ /* Now, allocate an I2C instance for this caller */
i2c = (FAR struct z8_i2cdev_s *)malloc(sizeof(FAR struct z8_i2cdev_s)); i2c = (FAR struct z8_i2cdev_s *)kmalloc(sizeof(FAR struct z8_i2cdev_s));
if (i2c) if (i2c)
{ {
/* Initialize the allocated instance */ /* Initialize the allocated instance */
@ -600,5 +601,6 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port)
i2c->ops = &g_ops; i2c->ops = &g_ops;
i2c->brg = g_currbrg; i2c->brg = g_currbrg;
} }
return (FAR struct i2c_dev_s *)i2c; return (FAR struct i2c_dev_s *)i2c;
} }

View File

@ -166,7 +166,7 @@ int exec_module(FAR const struct binary_s *binp)
/* Allocate the stack for the new task */ /* Allocate the stack for the new task */
#ifndef CONFIG_CUSTOM_STACK #ifndef CONFIG_CUSTOM_STACK
stack = (FAR uint32_t*)kmalloc(binp->stacksize); stack = (FAR uint32_t*)kumalloc(binp->stacksize);
if (!tcb) if (!tcb)
{ {
err = ENOMEM; err = ENOMEM;
@ -246,7 +246,7 @@ errout_with_stack:
#ifndef CONFIG_CUSTOM_STACK #ifndef CONFIG_CUSTOM_STACK
tcb->cmn.stack_alloc_ptr = NULL; tcb->cmn.stack_alloc_ptr = NULL;
sched_releasetcb(&tcb->cmn); sched_releasetcb(&tcb->cmn);
kfree(stack); kufree(stack);
#else #else
sched_releasetcb(&tcb->cmn); sched_releasetcb(&tcb->cmn);
#endif #endif

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* binfmt/binfmt_loadmodule.c * binfmt/binfmt_loadmodule.c
* *
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2009, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -45,6 +45,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <nuttx/kmalloc.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt/binfmt.h>
#include "binfmt_internal.h" #include "binfmt_internal.h"
@ -183,7 +184,7 @@ int unload_module(FAR const struct binary_s *binp)
if (binp->alloc[i]) if (binp->alloc[i])
{ {
bvdbg("Freeing alloc[%d]: %p\n", i, binp->alloc[i]); bvdbg("Freeing alloc[%d]: %p\n", i, binp->alloc[i]);
free((FAR void *)binp->alloc[i]); kufree((FAR void *)binp->alloc[i]);
} }
} }

View File

@ -68,7 +68,7 @@
* *
* Description: * Description:
* Allocate memory for the ELF image (elfalloc). If CONFIG_ADDRENV=n, * Allocate memory for the ELF image (elfalloc). If CONFIG_ADDRENV=n,
* elfalloc will be allocated using kzalloc(). If CONFIG_ADDRENV-y, then * elfalloc will be allocated using kuzalloc(). If CONFIG_ADDRENV-y, then
* elfalloc will be allocated using up_addrenv_create(). In either case, * elfalloc will be allocated using up_addrenv_create(). In either case,
* there will be a unique instance of elfalloc (and stack) for each * there will be a unique instance of elfalloc (and stack) for each
* instance of a process. * instance of a process.
@ -116,7 +116,7 @@ int elf_addrenv_alloc(FAR struct elf_loadinfo_s *loadinfo, size_t envsize)
#else #else
/* Allocate memory to hold the ELF image */ /* Allocate memory to hold the ELF image */
loadinfo->elfalloc = (uintptr_t)kzalloc(envsize); loadinfo->elfalloc = (uintptr_t)kuzalloc(envsize);
if (!loadinfo->elfalloc) if (!loadinfo->elfalloc)
{ {
return -ENOMEM; return -ENOMEM;
@ -167,7 +167,7 @@ void elf_addrenv_free(FAR struct elf_loadinfo_s *loadinfo)
if (loadinfo->elfalloc != 0) if (loadinfo->elfalloc != 0)
{ {
kfree((FAR void *)loadinfo->elfalloc); kufree((FAR void *)loadinfo->elfalloc);
loadinfo->elfalloc = 0; loadinfo->elfalloc = 0;
} }

View File

@ -163,7 +163,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo)
{ {
/* Allocate memory to hold a copy of the .ctor section */ /* Allocate memory to hold a copy of the .ctor section */
loadinfo->ctoralloc = (binfmt_ctor_t*)kmalloc(ctorsize); loadinfo->ctoralloc = (binfmt_ctor_t*)kumalloc(ctorsize);
if (!loadinfo->ctoralloc) if (!loadinfo->ctoralloc)
{ {
bdbg("Failed to allocate memory for .ctors\n"); bdbg("Failed to allocate memory for .ctors\n");

View File

@ -163,7 +163,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo)
{ {
/* Allocate memory to hold a copy of the .dtor section */ /* Allocate memory to hold a copy of the .dtor section */
loadinfo->ctoralloc = (binfmt_dtor_t*)kmalloc(dtorsize); loadinfo->ctoralloc = (binfmt_dtor_t*)kumalloc(dtorsize);
if (!loadinfo->ctoralloc) if (!loadinfo->ctoralloc)
{ {
bdbg("Failed to allocate memory for .dtors\n"); bdbg("Failed to allocate memory for .dtors\n");

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* binfmt/libelf/elf_iobuffer.c * binfmt/libelf/elf_iobuffer.c
* *
* Copyright (C) 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

View File

@ -92,7 +92,7 @@ int elf_unload(struct elf_loadinfo_s *loadinfo)
#ifdef CONFIG_BINFMT_CONSTRUCTORS #ifdef CONFIG_BINFMT_CONSTRUCTORS
if (loadinfo->ctoralloc != 0) if (loadinfo->ctoralloc != 0)
{ {
kfree(loadinfo->ctoralloc); kufree(loadinfo->ctoralloc);
loadinfo->ctoralloc = NULL; loadinfo->ctoralloc = NULL;
} }
@ -101,7 +101,7 @@ int elf_unload(struct elf_loadinfo_s *loadinfo)
if (loadinfo->dtoralloc != 0) if (loadinfo->dtoralloc != 0)
{ {
kfree(loadinfo->dtoralloc); kufree(loadinfo->dtoralloc);
loadinfo->dtoralloc = NULL; loadinfo->dtoralloc = NULL;
} }

View File

@ -69,7 +69,7 @@
* *
* Description: * Description:
* Allocate memory for the ELF image (elfalloc). If CONFIG_ADDRENV=n, * Allocate memory for the ELF image (elfalloc). If CONFIG_ADDRENV=n,
* elfalloc will be allocated using kzalloc(). If CONFIG_ADDRENV-y, then * elfalloc will be allocated using kuzalloc(). If CONFIG_ADDRENV-y, then
* elfalloc will be allocated using up_addrenv_create(). In either case, * elfalloc will be allocated using up_addrenv_create(). In either case,
* there will be a unique instance of elfalloc (and stack) for each * there will be a unique instance of elfalloc (and stack) for each
* instance of a process. * instance of a process.
@ -164,7 +164,7 @@ errout_with_dspace:
#else #else
/* Allocate (and zero) memory to hold the ELF image */ /* Allocate (and zero) memory to hold the ELF image */
dspace->region = (FAR uint8_t *)kzalloc(envsize); dspace->region = (FAR uint8_t *)kuzalloc(envsize);
if (!dspace->region) if (!dspace->region)
{ {
kfree(dspace); kfree(dspace);
@ -222,7 +222,7 @@ void nxflat_addrenv_free(FAR struct nxflat_loadinfo_s *loadinfo)
if (dspace->region) if (dspace->region)
{ {
kfree(dspace->region); kufree(dspace->region);
} }
#endif #endif

View File

@ -1671,8 +1671,6 @@ defconfig -- This is a configuration file similar to the Linux
for the main user thread that begins at the user_start() entry point. for the main user thread that begins at the user_start() entry point.
CONFIG_PTHREAD_STACK_MIN - Minimum pthread stack size CONFIG_PTHREAD_STACK_MIN - Minimum pthread stack size
CONFIG_PTHREAD_STACK_DEFAULT - Default pthread stack size CONFIG_PTHREAD_STACK_DEFAULT - Default pthread stack size
CONFIG_HEAP_BASE - The beginning of the heap
CONFIG_HEAP_SIZE - The size of the heap
appconfig -- This is another configuration file that is specific to the appconfig -- This is another configuration file that is specific to the
application. This file is copied into the application build directory application. This file is copied into the application build directory

View File

@ -419,5 +419,3 @@ CONFIG_IDLETHREAD_STACKSIZE=512
CONFIG_USERMAIN_STACKSIZE=512 CONFIG_USERMAIN_STACKSIZE=512
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_PTHREAD_STACK_DEFAULT=1024
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -429,5 +429,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -429,5 +429,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -256,8 +256,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_PTHREAD_STACK_DEFAULT=4096
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
# #
# Maintain legacy build behavior (revisit) # Maintain legacy build behavior (revisit)

View File

@ -256,8 +256,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_PTHREAD_STACK_DEFAULT=4096
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
# #
# Maintain legacy build behavior (revisit) # Maintain legacy build behavior (revisit)

View File

@ -256,8 +256,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_PTHREAD_STACK_DEFAULT=4096
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
# #
# Maintain legacy build behavior (revisit) # Maintain legacy build behavior (revisit)

View File

@ -256,8 +256,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_PTHREAD_STACK_DEFAULT=4096
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
# #
# Maintain legacy build behavior (revisit) # Maintain legacy build behavior (revisit)

View File

@ -277,8 +277,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_PTHREAD_STACK_DEFAULT=4096
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
# #
# Maintain legacy build behavior (revisit) # Maintain legacy build behavior (revisit)

View File

@ -279,8 +279,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_PTHREAD_STACK_DEFAULT=4096
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
# #
# Maintain legacy build behavior (revisit) # Maintain legacy build behavior (revisit)

View File

@ -324,8 +324,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_PTHREAD_STACK_DEFAULT=4096
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
# #
# Maintain legacy build behavior (revisit) # Maintain legacy build behavior (revisit)

View File

@ -399,5 +399,3 @@ CONFIG_IDLETHREAD_STACKSIZE=256
CONFIG_USERMAIN_STACKSIZE=512 CONFIG_USERMAIN_STACKSIZE=512
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=256 CONFIG_PTHREAD_STACK_DEFAULT=256
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -2,7 +2,7 @@
########################################################################### ###########################################################################
# configs/ea3131/locked/mklocked.sh # configs/ea3131/locked/mklocked.sh
# #
# Copyright (C) 2010-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2010-2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -155,12 +155,7 @@ fi
echo "EXTERN(dq_addfirst)" >>ld-locked.inc echo "EXTERN(dq_addfirst)" >>ld-locked.inc
echo "EXTERN(up_initial_state)" >>ld-locked.inc echo "EXTERN(up_initial_state)" >>ld-locked.inc
echo "EXTERN(up_allocate_heap)" >>ld-locked.inc
answer=$(checkconfig CONFIG_HEAP_BASE)
if [ $answer = n ]; then
echo "EXTERN(up_allocate_heap)" >>ld-locked.inc
fi
echo "EXTERN(mm_initialize)" >>ld-locked.inc echo "EXTERN(mm_initialize)" >>ld-locked.inc
echo "EXTERN(irq_initialize)" >>ld-locked.inc echo "EXTERN(irq_initialize)" >>ld-locked.inc
echo "EXTERN(wd_initialize)" >>ld-locked.inc echo "EXTERN(wd_initialize)" >>ld-locked.inc

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/ea3131/src/up_usbmsc.c * configs/ea3131/src/up_usbmsc.c
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Configure and register the SAM3U MMC/SD SDIO block driver. * Configure and register the SAM3U MMC/SD SDIO block driver.
@ -46,6 +46,7 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/mkfatfs.h> #include <nuttx/fs/mkfatfs.h>
#include <nuttx/ramdisk.h> #include <nuttx/ramdisk.h>
@ -88,7 +89,7 @@ int usbmsc_archinitialize(void)
uint8_t *pbuffer; uint8_t *pbuffer;
int ret; int ret;
pbuffer = (uint8_t *) malloc (BUFFER_SIZE); pbuffer = (uint8_t *)kmalloc(BUFFER_SIZE);
if (!pbuffer) if (!pbuffer)
{ {
lowsyslog("usbmsc_archinitialize: Failed to allocate ramdisk of size %d\n", lowsyslog("usbmsc_archinitialize: Failed to allocate ramdisk of size %d\n",
@ -107,7 +108,7 @@ int usbmsc_archinitialize(void)
{ {
printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", printf("create_ramdisk: Failed to register ramdisk at %s: %d\n",
g_source, -ret); g_source, -ret);
free(pbuffer); kfree(pbuffer);
return ret; return ret;
} }
@ -118,7 +119,7 @@ int usbmsc_archinitialize(void)
{ {
printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n",
g_source); g_source);
/* free(pbuffer); -- RAM disk is registered */ /* kfree(pbuffer); -- RAM disk is registered */
return ret; return ret;
} }

View File

@ -46,6 +46,7 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/fs/mkfatfs.h> #include <nuttx/fs/mkfatfs.h>
#include <nuttx/ramdisk.h> #include <nuttx/ramdisk.h>
@ -88,7 +89,7 @@ int usbmsc_archinitialize(void)
uint8_t *pbuffer; uint8_t *pbuffer;
int ret; int ret;
pbuffer = (uint8_t *) malloc (BUFFER_SIZE); pbuffer = (uint8_t *)kmalloc(BUFFER_SIZE);
if (!pbuffer) if (!pbuffer)
{ {
lowsyslog("usbmsc_archinitialize: Failed to allocate ramdisk of size %d\n", lowsyslog("usbmsc_archinitialize: Failed to allocate ramdisk of size %d\n",
@ -107,7 +108,7 @@ int usbmsc_archinitialize(void)
{ {
printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", printf("create_ramdisk: Failed to register ramdisk at %s: %d\n",
g_source, -ret); g_source, -ret);
free(pbuffer); kfree(pbuffer);
return ret; return ret;
} }
@ -118,7 +119,7 @@ int usbmsc_archinitialize(void)
{ {
printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n",
g_source); g_source);
/* free(pbuffer); -- RAM disk is registered */ /* kfree(pbuffer); -- RAM disk is registered */
return ret; return ret;
} }

View File

@ -348,5 +348,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -331,5 +331,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -333,5 +333,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -334,5 +334,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -328,5 +328,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -372,5 +372,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=8192 CONFIG_USERMAIN_STACKSIZE=8192
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -430,5 +430,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_PTHREAD_STACK_DEFAULT=1024
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -438,5 +438,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -423,5 +423,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_PTHREAD_STACK_DEFAULT=1024
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -423,5 +423,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_PTHREAD_STACK_DEFAULT=1024
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -423,5 +423,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1024
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_PTHREAD_STACK_DEFAULT=1024
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -485,5 +485,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -470,5 +470,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -589,5 +589,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -578,5 +578,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -586,5 +586,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -502,5 +502,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -492,5 +492,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -467,5 +467,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -447,5 +447,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -486,5 +486,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -347,5 +347,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -344,5 +344,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -346,5 +346,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -413,5 +413,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -343,5 +343,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -608,5 +608,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -585,5 +585,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -484,5 +484,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -494,5 +494,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -546,5 +546,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -472,5 +472,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -511,5 +511,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=8192 CONFIG_USERMAIN_STACKSIZE=8192
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -468,5 +468,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -207,8 +207,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_PTHREAD_STACK_DEFAULT=4096
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=
# #
# Maintain legacy build behavior (revisit) # Maintain legacy build behavior (revisit)

View File

@ -476,5 +476,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -447,5 +447,3 @@ CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -420,5 +420,3 @@ CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -339,5 +339,3 @@ CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -348,5 +348,3 @@ CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -361,5 +361,3 @@ CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -414,5 +414,3 @@ CONFIG_IDLETHREAD_STACKSIZE=512
CONFIG_USERMAIN_STACKSIZE=512 CONFIG_USERMAIN_STACKSIZE=512
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_PTHREAD_STACK_DEFAULT=1024
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -494,5 +494,3 @@ CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -537,5 +537,3 @@ CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -470,5 +470,3 @@ CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

Some files were not shown because too many files have changed in this diff Show More