summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/kmalloc.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-03 20:41:49 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-03 20:41:49 +0000
commit758d4800642060f50cdf26f7063c9825ea635d15 (patch)
treee689f42a002a2fd57548de0a3eb2aab98fe8f0f0 /nuttx/include/nuttx/kmalloc.h
parentc5ec7c478098273586b7a5716e30dc82c1e6aba5 (diff)
downloadnuttx-758d4800642060f50cdf26f7063c9825ea635d15.tar.gz
nuttx-758d4800642060f50cdf26f7063c9825ea635d15.tar.bz2
nuttx-758d4800642060f50cdf26f7063c9825ea635d15.zip
Move memory manager into user space
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3460 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/nuttx/kmalloc.h')
-rw-r--r--nuttx/include/nuttx/kmalloc.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/nuttx/include/nuttx/kmalloc.h b/nuttx/include/nuttx/kmalloc.h
index 2f2df3663..7fb37a5d0 100644
--- a/nuttx/include/nuttx/kmalloc.h
+++ b/nuttx/include/nuttx/kmalloc.h
@@ -1,7 +1,7 @@
/****************************************************************************
* include/nuttx/kmalloc.h
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -63,21 +63,28 @@ extern "C" {
# include <stdlib.h>
# define kmalloc(s) malloc(s)
#else
-KMALLOC_EXTERN FAR void *kmalloc(size_t);
+KMALLOC_EXTERN FAR void *kmalloc(size_t);
#endif
-#ifndef CONFIG_ARCH_KZMALLOC
+#ifndef CONFIG_ARCH_KZALLOC
# include <stdlib.h>
-# define kzmalloc(s) zalloc(s)
+# define kzalloc(s) zalloc(s)
#else
-KMALLOC_EXTERN FAR void *kzalloc(size_t);
+KMALLOC_EXTERN FAR void *kzalloc(size_t);
+#endif
+
+#ifndef CONFIG_ARCH_KREALLOC
+# include <stdlib.h>
+# define krealloc(p,s) realloc(p,s)
+#else
+KMALLOC_EXTERN FAR void *krealloc(FAR void*, size_t);
#endif
#ifndef CONFIG_ARCH_KFREE
# include <stdlib.h>
# define kfree(p) free(p)
#else
-KMALLOC_EXTERN void kfree(FAR void*);
+KMALLOC_EXTERN void kfree(FAR void*);
#endif
/* Functions defined in os_list.c *******************************************/