Switching to C99 stdint/stdbool.h types
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2342 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
d67e9f0ad9
commit
2f0e15334b
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_addfreechunk.c
|
||||
/************************************************************************
|
||||
* mm/mm_addfreechunk.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,35 +31,35 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include "mm_environment.h"
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* mm_addfreechunk
|
||||
*
|
||||
* Description:
|
||||
* Add a free chunk to the node next
|
||||
* It is assumed that the caller holds the mm semaphore
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void mm_addfreechunk(FAR struct mm_freenode_s *node)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* mm_calloc.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,29 +31,29 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include "mm_environment.h"
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* calloc
|
||||
*
|
||||
* Descripton:
|
||||
* calloc calculates the size and calls zalloc
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
FAR void *calloc(size_t n, size_t elem_size)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* mm_environment.h
|
||||
* mm/mm_environment.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -33,8 +33,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __MM_ENVIRONMENT_H
|
||||
#define __MM_ENVIRONMENT_H
|
||||
#ifndef __MM_MM_ENVIRONMENT_H
|
||||
#define __MM_MM_ENVIRONMENT_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Special definitions used when the memory mnager is built
|
||||
@ -125,4 +125,4 @@ extern void mm_addregion(FAR void *heapstart, size_t heapsize);
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __MM_ENVIRONMENT_H */
|
||||
#endif /* __MM_MM_ENVIRONMENT_H */
|
||||
|
32
mm/mm_free.c
32
mm/mm_free.c
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_free.c
|
||||
/************************************************************************
|
||||
* mm/mm_free.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,36 +31,36 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <assert.h>
|
||||
#include "mm_environment.h"
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* free
|
||||
*
|
||||
* Description:
|
||||
* Returns a chunk of memory into the list of free nodes,
|
||||
* merging with adjacent free chunks if possible.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void free(FAR void *mem)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* mm_initialize.c
|
||||
* mm/mm_initialize.c
|
||||
*
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
@ -41,7 +41,7 @@
|
||||
#include "mm_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_internal.h
|
||||
/************************************************************************
|
||||
* mm/mm_internal.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,18 +31,18 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#ifndef __MM_INTERNAL_H
|
||||
#define __MM_INTERNAL_H
|
||||
#ifndef __MM_MM_INTERNAL_H
|
||||
#define __MM_MM_INTERNAL_H
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/* These definitions define the characteristics of allocator
|
||||
*
|
||||
@ -92,9 +92,9 @@
|
||||
#define MM_IS_ALLOCATED(n) \
|
||||
((int)((struct mm_allocnode_s*)(n)->preceding) < 0))
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Types
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/* This describes an allocated chunk. An allocated chunk is
|
||||
* distinguished from a free chunk by bit 31 of the 'precding'
|
||||
@ -150,9 +150,9 @@ struct mallinfo
|
||||
};
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/* This is the size of the heap provided to mm */
|
||||
|
||||
@ -176,9 +176,9 @@ extern int g_nregions;
|
||||
|
||||
extern FAR struct mm_freenode_s g_nodelist[MM_NNODES];
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/* Normally defined in malloc.h */
|
||||
|
||||
@ -207,4 +207,4 @@ extern void mm_givesemaphore(void);
|
||||
extern int mm_getsemaphore(void);
|
||||
#endif
|
||||
|
||||
#endif /* __MM_INTERNAL_H */
|
||||
#endif /* __MM_MM_INTERNAL_H */
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "mm_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_malloc.c
|
||||
* mm/mm_malloc.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -46,7 +46,7 @@
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
************************************************************/
|
||||
|
||||
#ifndef NULL
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_memalign.c
|
||||
* mm/mm_memalign.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -42,7 +42,7 @@
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
************************************************************/
|
||||
|
||||
/************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_realloc.c
|
||||
* mm/mm_realloc.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -43,7 +43,7 @@
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
************************************************************/
|
||||
|
||||
/************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* mm_sem.c
|
||||
* mm/mm_sem.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -45,7 +45,7 @@
|
||||
#include "mm_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Define the following to enable semaphore state monitoring */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_shrinkchunk.c
|
||||
/************************************************************************
|
||||
* mm/mm_shrinkchunk.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,24 +31,24 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include "mm_environment.h"
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* mm_shrinkchunk
|
||||
*
|
||||
* Description:
|
||||
@ -62,7 +62,7 @@
|
||||
* (1) size is the whole chunk size (payload and header)
|
||||
* (2) the caller must hold the MM semaphore.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void mm_shrinkchunk(FAR struct mm_allocnode_s *node, size_t size)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_size2ndx.c
|
||||
/************************************************************************
|
||||
* mm/mm_size2ndx.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,22 +31,22 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include "mm_environment.h"
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/* Convert the size to a nodelist index */
|
||||
|
||||
|
16
mm/mm_test.c
16
mm/mm_test.c
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_test.c
|
||||
/************************************************************************
|
||||
* mm/mm_test.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,7 +31,7 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
#include "mm_internal.h"
|
||||
|
||||
/* Definitions */
|
||||
/* Pre-processor Definitions */
|
||||
|
||||
#define TEST_HEAP1_SIZE 0x00080000
|
||||
#define TEST_HEAP2_SIZE 0x00080000
|
||||
@ -102,9 +102,9 @@ static struct mallinfo alloc_info;
|
||||
static unsigned int g_reportedheapsize = 0;
|
||||
static unsigned int g_actualheapsize = 0;
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* mm_showchunkinfo
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
static int mm_findinfreelist(struct mm_freenode_s *node)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mm_zalloc.c
|
||||
/************************************************************************
|
||||
* mm/mm_zalloc.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,30 +31,30 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include "mm_environment.h"
|
||||
#include "mm_internal.h"
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public: Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Name: zalloc
|
||||
*
|
||||
* Description:
|
||||
* zalloc calls malloc, then zeroes out the allocated chunk.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
FAR void *zalloc(size_t size)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user