summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/arch/arm/src/common/up_createstack.c2
-rwxr-xr-xnuttx/arch/arm/src/lpc31xx/lpc31_ehci.c2
-rwxr-xr-xnuttx/arch/arm/src/sama5/sam_ehci.c2
-rw-r--r--nuttx/arch/arm/src/sama5/sam_ohci.c2
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_procfs_ccm.c4
-rw-r--r--nuttx/arch/avr/src/avr32/up_createstack.c2
-rw-r--r--nuttx/arch/hc/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/mips/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/rgmp/src/x86/com.c4
-rw-r--r--nuttx/arch/sh/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/x86/src/i486/up_createstack.c2
-rw-r--r--nuttx/arch/z80/src/common/up_createstack.c2
-rw-r--r--nuttx/audio/audio.c4
-rw-r--r--nuttx/audio/pcm_decode.c4
-rw-r--r--nuttx/binfmt/binfmt_exec.c2
-rw-r--r--nuttx/binfmt/binfmt_execmodule.c2
-rw-r--r--nuttx/binfmt/libelf/libelf.h2
-rw-r--r--nuttx/binfmt/libelf/libelf_addrenv.c2
-rw-r--r--nuttx/binfmt/libnxflat/libnxflat.h2
-rw-r--r--nuttx/binfmt/libnxflat/libnxflat_addrenv.c2
-rw-r--r--nuttx/crypto/testmngr.c2
-rw-r--r--nuttx/drivers/audio/audio_null.c4
-rw-r--r--nuttx/drivers/audio/i2schar.c2
-rw-r--r--nuttx/drivers/audio/wm8904.c4
-rw-r--r--nuttx/drivers/bch/bchlib_setup.c2
-rw-r--r--nuttx/drivers/input/mxt.c6
-rw-r--r--nuttx/drivers/input/stmpe811_base.c2
-rw-r--r--nuttx/drivers/loop.c2
-rw-r--r--nuttx/drivers/mtd/at25.c4
-rw-r--r--nuttx/drivers/mtd/at45db.c4
-rw-r--r--nuttx/drivers/mtd/m25px.c4
-rwxr-xr-xnuttx/drivers/mtd/mtd_nand.c2
-rw-r--r--nuttx/drivers/mtd/mtd_partition.c8
-rw-r--r--nuttx/drivers/mtd/mtd_procfs.c4
-rw-r--r--nuttx/drivers/mtd/mtd_rwbuffer.c4
-rw-r--r--nuttx/drivers/mtd/rammtd.c4
-rw-r--r--nuttx/drivers/mtd/ramtron.c4
-rw-r--r--nuttx/drivers/mtd/sector512.c4
-rw-r--r--nuttx/drivers/mtd/sst25.c4
-rw-r--r--nuttx/drivers/mtd/sst25xx.c4
-rw-r--r--nuttx/drivers/mtd/w25.c4
-rw-r--r--nuttx/drivers/net/e1000.c2
-rw-r--r--nuttx/drivers/power/max1704x.c2
-rw-r--r--nuttx/drivers/pwm.c4
-rw-r--r--nuttx/drivers/sensors/qencoder.c4
-rw-r--r--nuttx/drivers/syslog/ramlog.c2
-rw-r--r--nuttx/drivers/timer.c4
-rw-r--r--nuttx/drivers/watchdog.c4
-rw-r--r--nuttx/fs/fat/fs_fat32.c4
-rw-r--r--nuttx/fs/fs_automount.c2
-rw-r--r--nuttx/fs/fs_inodereserve.c2
-rw-r--r--nuttx/fs/fs_select.c2
-rw-r--r--nuttx/fs/nfs/nfs_vfsops.c6
-rw-r--r--nuttx/fs/nfs/rpc_clnt.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_initialize.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_open.c4
-rw-r--r--nuttx/fs/procfs/fs_procfs.c4
-rw-r--r--nuttx/fs/procfs/fs_procfscpuload.c2
-rw-r--r--nuttx/fs/procfs/fs_procfsproc.c6
-rw-r--r--nuttx/fs/procfs/fs_procfsuptime.c2
-rw-r--r--nuttx/fs/procfs/fs_skeleton.c6
-rw-r--r--nuttx/fs/romfs/fs_romfs.c4
-rw-r--r--nuttx/fs/smartfs/smartfs_procfs.c6
-rw-r--r--nuttx/fs/smartfs/smartfs_smart.c2
-rw-r--r--nuttx/graphics/nxconsole/nxcon_register.c2
-rw-r--r--nuttx/include/nuttx/binfmt/elf.h2
-rw-r--r--nuttx/include/nuttx/binfmt/nxflat.h2
-rw-r--r--nuttx/mm/kmm_zalloc.c4
-rw-r--r--nuttx/mm/umm_zalloc.c2
-rw-r--r--nuttx/net/igmp/igmp_group.c2
-rw-r--r--nuttx/net/tcp/tcp_backlog.c2
-rw-r--r--nuttx/sched/group/group_create.c2
-rw-r--r--nuttx/sched/mqueue/mq_open.c2
-rw-r--r--nuttx/sched/pthread/pthread_create.c4
-rw-r--r--nuttx/sched/task/task_create.c2
-rw-r--r--nuttx/sched/task/task_vfork.c2
76 files changed, 116 insertions, 116 deletions
diff --git a/nuttx/arch/arm/src/common/up_createstack.c b/nuttx/arch/arm/src/common/up_createstack.c
index 2748f52b9..954941815 100644
--- a/nuttx/arch/arm/src/common/up_createstack.c
+++ b/nuttx/arch/arm/src/common/up_createstack.c
@@ -163,7 +163,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
- tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
#else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif
diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c b/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
index 54e4f0e6a..757ce3649 100755
--- a/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
+++ b/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
@@ -3617,7 +3617,7 @@ static int lpc31_epalloc(FAR struct usbhost_driver_s *drvr,
/* Allocate a endpoint information structure */
- epinfo = (struct lpc31_epinfo_s *)kzalloc(sizeof(struct lpc31_epinfo_s));
+ epinfo = (struct lpc31_epinfo_s *)kmm_zalloc(sizeof(struct lpc31_epinfo_s));
if (!epinfo)
{
usbhost_trace1(EHCI_TRACE1_EPALLOC_FAILED, 0);
diff --git a/nuttx/arch/arm/src/sama5/sam_ehci.c b/nuttx/arch/arm/src/sama5/sam_ehci.c
index e0c17f2ff..9dec51472 100755
--- a/nuttx/arch/arm/src/sama5/sam_ehci.c
+++ b/nuttx/arch/arm/src/sama5/sam_ehci.c
@@ -3457,7 +3457,7 @@ static int sam_epalloc(FAR struct usbhost_driver_s *drvr,
/* Allocate a endpoint information structure */
- epinfo = (struct sam_epinfo_s *)kzalloc(sizeof(struct sam_epinfo_s));
+ epinfo = (struct sam_epinfo_s *)kmm_zalloc(sizeof(struct sam_epinfo_s));
if (!epinfo)
{
usbhost_trace1(EHCI_TRACE1_EPALLOC_FAILED, 0);
diff --git a/nuttx/arch/arm/src/sama5/sam_ohci.c b/nuttx/arch/arm/src/sama5/sam_ohci.c
index dd8229eda..a0cc6cc9d 100644
--- a/nuttx/arch/arm/src/sama5/sam_ohci.c
+++ b/nuttx/arch/arm/src/sama5/sam_ohci.c
@@ -2359,7 +2359,7 @@ static int sam_epalloc(FAR struct usbhost_driver_s *drvr,
/* Allocate a container for the endpoint data */
- eplist = (struct sam_eplist_s *)kzalloc(sizeof(struct sam_eplist_s));
+ eplist = (struct sam_eplist_s *)kmm_zalloc(sizeof(struct sam_eplist_s));
if (!eplist)
{
usbhost_trace1(OHCI_TRACE1_EPLISTALLOC_FAILED, 0);
diff --git a/nuttx/arch/arm/src/stm32/stm32_procfs_ccm.c b/nuttx/arch/arm/src/stm32/stm32_procfs_ccm.c
index 6918e3776..f3da37b7b 100644
--- a/nuttx/arch/arm/src/stm32/stm32_procfs_ccm.c
+++ b/nuttx/arch/arm/src/stm32/stm32_procfs_ccm.c
@@ -165,7 +165,7 @@ static int ccm_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the task and attribute selection */
- priv = (FAR struct ccm_file_s *)kzalloc(sizeof(struct ccm_file_s));
+ priv = (FAR struct ccm_file_s *)kmm_zalloc(sizeof(struct ccm_file_s));
if (!priv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -282,7 +282,7 @@ static int ccm_dup(FAR const struct file *oldp, FAR struct file *newp)
/* Allocate a new container to hold the task and attribute selection */
- newpriv = (FAR struct ccm_file_s *)kzalloc(sizeof(struct ccm_file_s));
+ newpriv = (FAR struct ccm_file_s *)kmm_zalloc(sizeof(struct ccm_file_s));
if (!newpriv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
diff --git a/nuttx/arch/avr/src/avr32/up_createstack.c b/nuttx/arch/avr/src/avr32/up_createstack.c
index a8e2bfeb7..1d840819b 100644
--- a/nuttx/arch/avr/src/avr32/up_createstack.c
+++ b/nuttx/arch/avr/src/avr32/up_createstack.c
@@ -130,7 +130,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
- tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
#else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif
diff --git a/nuttx/arch/hc/src/common/up_createstack.c b/nuttx/arch/hc/src/common/up_createstack.c
index 4646b8ad6..50c2c4626 100644
--- a/nuttx/arch/hc/src/common/up_createstack.c
+++ b/nuttx/arch/hc/src/common/up_createstack.c
@@ -127,7 +127,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
- tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
#else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif
diff --git a/nuttx/arch/mips/src/common/up_createstack.c b/nuttx/arch/mips/src/common/up_createstack.c
index 676b1e6a4..36754d546 100644
--- a/nuttx/arch/mips/src/common/up_createstack.c
+++ b/nuttx/arch/mips/src/common/up_createstack.c
@@ -148,7 +148,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
- tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
#else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif
diff --git a/nuttx/arch/rgmp/src/x86/com.c b/nuttx/arch/rgmp/src/x86/com.c
index a4998f27b..28c5bc517 100644
--- a/nuttx/arch/rgmp/src/x86/com.c
+++ b/nuttx/arch/rgmp/src/x86/com.c
@@ -174,11 +174,11 @@ static uart_dev_t *up_alloc_com(unsigned int base, int irq)
uart_dev_t *dev;
struct up_dev_s *priv;
- priv = kzalloc(sizeof(struct up_dev_s));
+ priv = kmm_zalloc(sizeof(struct up_dev_s));
if (priv == NULL)
goto err0;
- dev = kzalloc(sizeof(uart_dev_t));
+ dev = kmm_zalloc(sizeof(uart_dev_t));
if (dev == NULL)
goto err1;
diff --git a/nuttx/arch/sh/src/common/up_createstack.c b/nuttx/arch/sh/src/common/up_createstack.c
index a56824627..52e311b76 100644
--- a/nuttx/arch/sh/src/common/up_createstack.c
+++ b/nuttx/arch/sh/src/common/up_createstack.c
@@ -127,7 +127,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
- tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
#else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif
diff --git a/nuttx/arch/x86/src/i486/up_createstack.c b/nuttx/arch/x86/src/i486/up_createstack.c
index 0e70c905f..a0731d9f7 100644
--- a/nuttx/arch/x86/src/i486/up_createstack.c
+++ b/nuttx/arch/x86/src/i486/up_createstack.c
@@ -129,7 +129,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
- tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
#else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif
diff --git a/nuttx/arch/z80/src/common/up_createstack.c b/nuttx/arch/z80/src/common/up_createstack.c
index 8c43a5049..96119a7e8 100644
--- a/nuttx/arch/z80/src/common/up_createstack.c
+++ b/nuttx/arch/z80/src/common/up_createstack.c
@@ -127,7 +127,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
- tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
#else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif
diff --git a/nuttx/audio/audio.c b/nuttx/audio/audio.c
index 3f0c9ebfb..763789c4d 100644
--- a/nuttx/audio/audio.c
+++ b/nuttx/audio/audio.c
@@ -882,14 +882,14 @@ int audio_register(FAR const char *name, FAR struct audio_lowerhalf_s *dev)
/* Allocate the upper-half data structure */
- upper = (FAR struct audio_upperhalf_s *)kzalloc(sizeof(struct audio_upperhalf_s));
+ upper = (FAR struct audio_upperhalf_s *)kmm_zalloc(sizeof(struct audio_upperhalf_s));
if (!upper)
{
auddbg("Allocation failed\n");
return -ENOMEM;
}
- /* Initialize the Audio device structure (it was already zeroed by kzalloc()) */
+ /* Initialize the Audio device structure (it was already zeroed by kmm_zalloc()) */
sem_init(&upper->exclsem, 0, 1);
upper->dev = dev;
diff --git a/nuttx/audio/pcm_decode.c b/nuttx/audio/pcm_decode.c
index f15f63a88..14e228a6d 100644
--- a/nuttx/audio/pcm_decode.c
+++ b/nuttx/audio/pcm_decode.c
@@ -1375,14 +1375,14 @@ FAR struct audio_lowerhalf_s *
/* Allocate an instance of our private data structure */
- priv = (FAR struct pcm_decode_s *)kzalloc(sizeof(struct pcm_decode_s));
+ priv = (FAR struct pcm_decode_s *)kmm_zalloc(sizeof(struct pcm_decode_s));
if (!priv)
{
auddbg("ERROR: Failed to allocate driver structure\n");
return NULL;
}
- /* Initialize our private data structure. Since kzalloc() was used for
+ /* Initialize our private data structure. Since kmm_zalloc() was used for
* the allocation, we need to initialize only non-zero, non-NULL, non-
* false fields.
*/
diff --git a/nuttx/binfmt/binfmt_exec.c b/nuttx/binfmt/binfmt_exec.c
index b8680c004..8760dd6ec 100644
--- a/nuttx/binfmt/binfmt_exec.c
+++ b/nuttx/binfmt/binfmt_exec.c
@@ -106,7 +106,7 @@ int exec(FAR const char *filename, FAR char * const *argv,
/* Allocate the load information */
- bin = (FAR struct binary_s *)kzalloc(sizeof(struct binary_s));
+ bin = (FAR struct binary_s *)kmm_zalloc(sizeof(struct binary_s));
if (!bin)
{
set_errno(ENOMEM);
diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c
index a2bcd2e41..414c17284 100644
--- a/nuttx/binfmt/binfmt_execmodule.c
+++ b/nuttx/binfmt/binfmt_execmodule.c
@@ -156,7 +156,7 @@ int exec_module(FAR const struct binary_s *binp)
/* Allocate a TCB for the new task. */
- tcb = (FAR struct task_tcb_s*)kzalloc(sizeof(struct task_tcb_s));
+ tcb = (FAR struct task_tcb_s*)kmm_zalloc(sizeof(struct task_tcb_s));
if (!tcb)
{
err = ENOMEM;
diff --git a/nuttx/binfmt/libelf/libelf.h b/nuttx/binfmt/libelf/libelf.h
index a8ab2a48f..e1382ee2d 100644
--- a/nuttx/binfmt/libelf/libelf.h
+++ b/nuttx/binfmt/libelf/libelf.h
@@ -265,7 +265,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo);
*
* Description:
* Allocate memory for the ELF image (textalloc and dataalloc). If
- * CONFIG_ARCH_ADDRENV=n, textalloc will be allocated using kzalloc() and
+ * CONFIG_ARCH_ADDRENV=n, textalloc will be allocated using kmm_zalloc() and
* dataalloc will be a offset from textalloc. If CONFIG_ARCH_ADDRENV-y, then
* textalloc and dataalloc will be allocated using up_addrenv_create(). In
* either case, there will be a unique instance of textalloc and dataalloc
diff --git a/nuttx/binfmt/libelf/libelf_addrenv.c b/nuttx/binfmt/libelf/libelf_addrenv.c
index cdcc5b77f..08beed008 100644
--- a/nuttx/binfmt/libelf/libelf_addrenv.c
+++ b/nuttx/binfmt/libelf/libelf_addrenv.c
@@ -68,7 +68,7 @@
*
* Description:
* Allocate memory for the ELF image (textalloc and dataalloc). If
- * CONFIG_ARCH_ADDRENV=n, textalloc will be allocated using kzalloc() and
+ * CONFIG_ARCH_ADDRENV=n, textalloc will be allocated using kmm_zalloc() and
* dataalloc will be a offset from textalloc. If CONFIG_ARCH_ADDRENV-y, then
* textalloc and dataalloc will be allocated using up_addrenv_create(). In
* either case, there will be a unique instance of textalloc and dataalloc
diff --git a/nuttx/binfmt/libnxflat/libnxflat.h b/nuttx/binfmt/libnxflat/libnxflat.h
index bcb88bdc6..fc3826295 100644
--- a/nuttx/binfmt/libnxflat/libnxflat.h
+++ b/nuttx/binfmt/libnxflat/libnxflat.h
@@ -60,7 +60,7 @@
*
* Description:
* Allocate data memory for the NXFLAT image. If CONFIG_ARCH_ADDRENV=n,
- * memory will be allocated using kzalloc(). If CONFIG_ARCH_ADDRENV-y,
+ * memory will be allocated using kmm_zalloc(). If CONFIG_ARCH_ADDRENV-y,
* then memory will be allocated using up_addrenv_create().
*
* Input Parameters:
diff --git a/nuttx/binfmt/libnxflat/libnxflat_addrenv.c b/nuttx/binfmt/libnxflat/libnxflat_addrenv.c
index 7ee0376d2..fb3dbe09a 100644
--- a/nuttx/binfmt/libnxflat/libnxflat_addrenv.c
+++ b/nuttx/binfmt/libnxflat/libnxflat_addrenv.c
@@ -69,7 +69,7 @@
*
* Description:
* Allocate data memory for the NXFLAT image. If CONFIG_ARCH_ADDRENV=n,
- * memory will be allocated using kzalloc(). If CONFIG_ARCH_ADDRENV-y,
+ * memory will be allocated using kmm_zalloc(). If CONFIG_ARCH_ADDRENV-y,
* then memory will be allocated using up_addrenv_create().
*
* Input Parameters:
diff --git a/nuttx/crypto/testmngr.c b/nuttx/crypto/testmngr.c
index 464f0fdc0..f9f6a8b4f 100644
--- a/nuttx/crypto/testmngr.c
+++ b/nuttx/crypto/testmngr.c
@@ -62,7 +62,7 @@
static int do_test_aes(FAR struct cipher_testvec* test, int mode, int encrypt)
{
- FAR void *out = kzalloc(test->rlen);
+ FAR void *out = kmm_zalloc(test->rlen);
int res = aes_cypher(out, test->input, test->ilen, test->iv, test->key,
test->klen, mode, encrypt);
if (res == OK)
diff --git a/nuttx/drivers/audio/audio_null.c b/nuttx/drivers/audio/audio_null.c
index 62ccc061f..446682486 100644
--- a/nuttx/drivers/audio/audio_null.c
+++ b/nuttx/drivers/audio/audio_null.c
@@ -831,10 +831,10 @@ FAR struct audio_lowerhalf_s *audio_null_initialize(void)
/* Allocate the null audio device structure */
- priv = (FAR struct null_dev_s *)kzalloc(sizeof(struct null_dev_s));
+ priv = (FAR struct null_dev_s *)kmm_zalloc(sizeof(struct null_dev_s));
if (priv)
{
- /* Initialize the null audio device structure. Since we used kzalloc,
+ /* Initialize the null audio device structure. Since we used kmm_zalloc,
* only the non-zero elements of the structure need to be initialized.
*/
diff --git a/nuttx/drivers/audio/i2schar.c b/nuttx/drivers/audio/i2schar.c
index a7a86e90f..4a12d5110 100644
--- a/nuttx/drivers/audio/i2schar.c
+++ b/nuttx/drivers/audio/i2schar.c
@@ -413,7 +413,7 @@ int i2schar_register(FAR struct i2s_dev_s *i2s, int minor)
/* Allocate a I2S character device structure */
- priv = (FAR struct i2schar_dev_s *)kzalloc(sizeof(struct i2schar_dev_s));
+ priv = (FAR struct i2schar_dev_s *)kmm_zalloc(sizeof(struct i2schar_dev_s));
if (priv)
{
/* Initialize the I2S character device structure */
diff --git a/nuttx/drivers/audio/wm8904.c b/nuttx/drivers/audio/wm8904.c
index c9e32548f..13712c051 100644
--- a/nuttx/drivers/audio/wm8904.c
+++ b/nuttx/drivers/audio/wm8904.c
@@ -2470,10 +2470,10 @@ FAR struct audio_lowerhalf_s *
/* Allocate a WM8904 device structure */
- priv = (FAR struct wm8904_dev_s *)kzalloc(sizeof(struct wm8904_dev_s));
+ priv = (FAR struct wm8904_dev_s *)kmm_zalloc(sizeof(struct wm8904_dev_s));
if (priv)
{
- /* Initialize the WM8904 device structure. Since we used kzalloc,
+ /* Initialize the WM8904 device structure. Since we used kmm_zalloc,
* only the non-zero elements of the structure need to be initialized.
*/
diff --git a/nuttx/drivers/bch/bchlib_setup.c b/nuttx/drivers/bch/bchlib_setup.c
index 5e3446610..e0c956a73 100644
--- a/nuttx/drivers/bch/bchlib_setup.c
+++ b/nuttx/drivers/bch/bchlib_setup.c
@@ -93,7 +93,7 @@ int bchlib_setup(const char *blkdev, bool readonly, FAR void **handle)
/* Allocate the BCH state structure */
- bch = (FAR struct bchlib_s*)kzalloc(sizeof(struct bchlib_s));
+ bch = (FAR struct bchlib_s*)kmm_zalloc(sizeof(struct bchlib_s));
if (!bch)
{
fdbg("Failed to allocate BCH structure\n");
diff --git a/nuttx/drivers/input/mxt.c b/nuttx/drivers/input/mxt.c
index 5fba84d99..318d1c0b5 100644
--- a/nuttx/drivers/input/mxt.c
+++ b/nuttx/drivers/input/mxt.c
@@ -1745,7 +1745,7 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv)
/* Allocate memory for the object table */
- priv->objtab = kzalloc(info->nobjects * sizeof(struct mxt_object_s));
+ priv->objtab = kmm_zalloc(info->nobjects * sizeof(struct mxt_object_s));
if (priv->objtab == NULL)
{
idbg("ERROR: Failed to allocate object table\n");
@@ -1807,7 +1807,7 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv)
/* Allocate a place to hold sample data for each slot */
priv->sample = (FAR struct mxt_sample_s *)
- kzalloc(nslots * sizeof(struct mxt_sample_s));
+ kmm_zalloc(nslots * sizeof(struct mxt_sample_s));
if (priv->sample == NULL)
{
idbg("ERROR: Failed to allocate object table\n");
@@ -1863,7 +1863,7 @@ int mxt_register(FAR struct i2c_dev_s *i2c,
/* Create and initialize a maXTouch device driver instance */
- priv = (FAR struct mxt_dev_s *)kzalloc(sizeof(struct mxt_dev_s));
+ priv = (FAR struct mxt_dev_s *)kmm_zalloc(sizeof(struct mxt_dev_s));
if (priv == NULL)
{
idbg("ERROR: Failed allocate device structure\n");
diff --git a/nuttx/drivers/input/stmpe811_base.c b/nuttx/drivers/input/stmpe811_base.c
index e651f40e8..0bdbbf23c 100644
--- a/nuttx/drivers/input/stmpe811_base.c
+++ b/nuttx/drivers/input/stmpe811_base.c
@@ -297,7 +297,7 @@ STMPE811_HANDLE stmpe811_instantiate(FAR struct i2c_dev_s *dev,
/* Allocate the device state structure */
#ifdef CONFIG_STMPE811_MULTIPLE
- priv = (FAR struct stmpe811_dev_s *)kzalloc(sizeof(struct stmpe811_dev_s));
+ priv = (FAR struct stmpe811_dev_s *)kmm_zalloc(sizeof(struct stmpe811_dev_s));
if (!priv)
{
return NULL;
diff --git a/nuttx/drivers/loop.c b/nuttx/drivers/loop.c
index f149f38cd..40d261ce5 100644
--- a/nuttx/drivers/loop.c
+++ b/nuttx/drivers/loop.c
@@ -381,7 +381,7 @@ int losetup(const char *devname, const char *filename, uint16_t sectsize,
/* Allocate a loop device structure */
- dev = (FAR struct loop_struct_s *)kzalloc(sizeof(struct loop_struct_s));
+ dev = (FAR struct loop_struct_s *)kmm_zalloc(sizeof(struct loop_struct_s));
if (!dev)
{
return -ENOMEM;
diff --git a/nuttx/drivers/mtd/at25.c b/nuttx/drivers/mtd/at25.c
index 08517f701..87b08405a 100644
--- a/nuttx/drivers/mtd/at25.c
+++ b/nuttx/drivers/mtd/at25.c
@@ -674,11 +674,11 @@ FAR struct mtd_dev_s *at25_initialize(FAR struct spi_dev_s *dev)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct at25_dev_s *)kzalloc(sizeof(struct at25_dev_s));
+ priv = (FAR struct at25_dev_s *)kmm_zalloc(sizeof(struct at25_dev_s));
if (priv)
{
/* Initialize the allocated structure (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
priv->mtd.erase = at25_erase;
diff --git a/nuttx/drivers/mtd/at45db.c b/nuttx/drivers/mtd/at45db.c
index 25ca42417..6984c1baf 100644
--- a/nuttx/drivers/mtd/at45db.c
+++ b/nuttx/drivers/mtd/at45db.c
@@ -827,11 +827,11 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct at45db_dev_s *)kzalloc(sizeof(struct at45db_dev_s));
+ priv = (FAR struct at45db_dev_s *)kmm_zalloc(sizeof(struct at45db_dev_s));
if (priv)
{
/* Initialize the allocated structure. (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
priv->mtd.erase = at45db_erase;
diff --git a/nuttx/drivers/mtd/m25px.c b/nuttx/drivers/mtd/m25px.c
index ce6d1e1e0..c49585ebb 100644
--- a/nuttx/drivers/mtd/m25px.c
+++ b/nuttx/drivers/mtd/m25px.c
@@ -998,11 +998,11 @@ FAR struct mtd_dev_s *m25p_initialize(FAR struct spi_dev_s *dev)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct m25p_dev_s *)kzalloc(sizeof(struct m25p_dev_s));
+ priv = (FAR struct m25p_dev_s *)kmm_zalloc(sizeof(struct m25p_dev_s));
if (priv)
{
/* Initialize the allocated structure. (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
priv->mtd.erase = m25p_erase;
diff --git a/nuttx/drivers/mtd/mtd_nand.c b/nuttx/drivers/mtd/mtd_nand.c
index 236d74134..3c333dd47 100755
--- a/nuttx/drivers/mtd/mtd_nand.c
+++ b/nuttx/drivers/mtd/mtd_nand.c
@@ -952,7 +952,7 @@ FAR struct mtd_dev_s *nand_initialize(FAR struct nand_raw_s *raw)
/* Allocate an NAND MTD device structure */
- nand = (FAR struct nand_dev_s *)kzalloc(sizeof(struct nand_dev_s));
+ nand = (FAR struct nand_dev_s *)kmm_zalloc(sizeof(struct nand_dev_s));
if (!nand)
{
fdbg("ERROR: Failed to allocate the NAND MTD device structure\n");
diff --git a/nuttx/drivers/mtd/mtd_partition.c b/nuttx/drivers/mtd/mtd_partition.c
index e753cc055..4b7931e78 100644
--- a/nuttx/drivers/mtd/mtd_partition.c
+++ b/nuttx/drivers/mtd/mtd_partition.c
@@ -495,7 +495,7 @@ static int part_procfs_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the task and attribute selection */
- attr = (FAR struct part_procfs_file_s *)kzalloc(sizeof(struct part_procfs_file_s));
+ attr = (FAR struct part_procfs_file_s *)kmm_zalloc(sizeof(struct part_procfs_file_s));
if (!attr)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -711,7 +711,7 @@ static int part_procfs_dup(FAR const struct file *oldp, FAR struct file *newp)
/* Allocate a new container to hold the task and attribute selection */
- newattr = (FAR struct part_procfs_file_s *)kzalloc(sizeof(struct part_procfs_file_s));
+ newattr = (FAR struct part_procfs_file_s *)kmm_zalloc(sizeof(struct part_procfs_file_s));
if (!newattr)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -833,7 +833,7 @@ FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd, off_t firstblock,
/* Allocate a partition device structure */
- part = (FAR struct mtd_partition_s *)kzalloc(sizeof(struct mtd_partition_s));
+ part = (FAR struct mtd_partition_s *)kmm_zalloc(sizeof(struct mtd_partition_s));
if (!part)
{
fdbg("ERROR: Failed to allocate memory for the partition device\n");
@@ -841,7 +841,7 @@ FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd, off_t firstblock,
}
/* Initialize the partition device structure. (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
part->child.erase = part_erase;
diff --git a/nuttx/drivers/mtd/mtd_procfs.c b/nuttx/drivers/mtd/mtd_procfs.c
index 05f17abef..fd27917e0 100644
--- a/nuttx/drivers/mtd/mtd_procfs.c
+++ b/nuttx/drivers/mtd/mtd_procfs.c
@@ -156,7 +156,7 @@ static int mtd_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a context structure */
- attr = (FAR struct mtd_file_s *)kzalloc(sizeof(struct mtd_file_s));
+ attr = (FAR struct mtd_file_s *)kmm_zalloc(sizeof(struct mtd_file_s));
if (!attr)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -276,7 +276,7 @@ static int mtd_dup(FAR const struct file *oldp, FAR struct file *newp)
/* Allocate a new container to hold the task and attribute selection */
- newattr = (FAR struct mtd_file_s *)kzalloc(sizeof(struct mtd_file_s));
+ newattr = (FAR struct mtd_file_s *)kmm_zalloc(sizeof(struct mtd_file_s));
if (!newattr)
{
fdbg("ERROR: Failed to allocate file attributes\n");
diff --git a/nuttx/drivers/mtd/mtd_rwbuffer.c b/nuttx/drivers/mtd/mtd_rwbuffer.c
index d0cd21dfb..f97c00a71 100644
--- a/nuttx/drivers/mtd/mtd_rwbuffer.c
+++ b/nuttx/drivers/mtd/mtd_rwbuffer.c
@@ -356,11 +356,11 @@ FAR struct mtd_dev_s *mtd_rwb_initialize(FAR struct mtd_dev_s *mtd)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct mtd_rwbuffer_s *)kzalloc(sizeof(struct mtd_rwbuffer_s));
+ priv = (FAR struct mtd_rwbuffer_s *)kmm_zalloc(sizeof(struct mtd_rwbuffer_s));
if (priv)
{
/* Initialize the allocated structure. (unsupported methods/fields
- * were already nullified by kzalloc).
+ * were already nullified by kmm_zalloc).
*/
priv->mtd.erase = mtd_erase; /* Our MTD erase method */
diff --git a/nuttx/drivers/mtd/rammtd.c b/nuttx/drivers/mtd/rammtd.c
index 907337b54..e84d94b61 100644
--- a/nuttx/drivers/mtd/rammtd.c
+++ b/nuttx/drivers/mtd/rammtd.c
@@ -443,7 +443,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size)
/* Create an instance of the RAM MTD device state structure */
- priv = (FAR struct ram_dev_s *)kzalloc(sizeof(struct ram_dev_s));
+ priv = (FAR struct ram_dev_s *)kmm_zalloc(sizeof(struct ram_dev_s));
if (!priv)
{
fdbg("Failed to allocate the RAM MTD state structure\n");
@@ -460,7 +460,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size)
}
/* Perform initialization as necessary. (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
priv->mtd.erase = ram_erase;
diff --git a/nuttx/drivers/mtd/ramtron.c b/nuttx/drivers/mtd/ramtron.c
index 285dc2dad..1c59b0567 100644
--- a/nuttx/drivers/mtd/ramtron.c
+++ b/nuttx/drivers/mtd/ramtron.c
@@ -689,11 +689,11 @@ FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct ramtron_dev_s *)kzalloc(sizeof(struct ramtron_dev_s));
+ priv = (FAR struct ramtron_dev_s *)kmm_zalloc(sizeof(struct ramtron_dev_s));
if (priv)
{
/* Initialize the allocated structure. (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
priv->mtd.erase = ramtron_erase;
diff --git a/nuttx/drivers/mtd/sector512.c b/nuttx/drivers/mtd/sector512.c
index f1da6df05..3b61e8210 100644
--- a/nuttx/drivers/mtd/sector512.c
+++ b/nuttx/drivers/mtd/sector512.c
@@ -603,11 +603,11 @@ FAR struct mtd_dev_s *s512_initialize(FAR struct mtd_dev_s *mtd)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct s512_dev_s *)kzalloc(sizeof(struct s512_dev_s));
+ priv = (FAR struct s512_dev_s *)kmm_zalloc(sizeof(struct s512_dev_s));
if (priv)
{
/* Initialize the allocated structure. (unsupported methods/fields
- * were already nullified by kzalloc).
+ * were already nullified by kmm_zalloc).
*/
priv->mtd.erase = s512_erase;
diff --git a/nuttx/drivers/mtd/sst25.c b/nuttx/drivers/mtd/sst25.c
index 72d4c14e3..edd8b7b30 100644
--- a/nuttx/drivers/mtd/sst25.c
+++ b/nuttx/drivers/mtd/sst25.c
@@ -1203,11 +1203,11 @@ FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct sst25_dev_s *)kzalloc(sizeof(struct sst25_dev_s));
+ priv = (FAR struct sst25_dev_s *)kmm_zalloc(sizeof(struct sst25_dev_s));
if (priv)
{
/* Initialize the allocated structure. (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
priv->mtd.erase = sst25_erase;
diff --git a/nuttx/drivers/mtd/sst25xx.c b/nuttx/drivers/mtd/sst25xx.c
index f6bcb53a7..8598dd51d 100644
--- a/nuttx/drivers/mtd/sst25xx.c
+++ b/nuttx/drivers/mtd/sst25xx.c
@@ -952,11 +952,11 @@ FAR struct mtd_dev_s *sst25xx_initialize(FAR struct spi_dev_s *dev)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct sst25xx_dev_s *)kzalloc(sizeof(struct sst25xx_dev_s));
+ priv = (FAR struct sst25xx_dev_s *)kmm_zalloc(sizeof(struct sst25xx_dev_s));
if (priv)
{
/* Initialize the allocated structure. (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
priv->mtd.erase = sst25xx_erase;
diff --git a/nuttx/drivers/mtd/w25.c b/nuttx/drivers/mtd/w25.c
index 49433d60c..f84643d03 100644
--- a/nuttx/drivers/mtd/w25.c
+++ b/nuttx/drivers/mtd/w25.c
@@ -1135,11 +1135,11 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi)
* to be extended to handle multiple FLASH parts on the same SPI bus.
*/
- priv = (FAR struct w25_dev_s *)kzalloc(sizeof(struct w25_dev_s));
+ priv = (FAR struct w25_dev_s *)kmm_zalloc(sizeof(struct w25_dev_s));
if (priv)
{
/* Initialize the allocated structure (unsupported methods were
- * nullified by kzalloc).
+ * nullified by kmm_zalloc).
*/
priv->mtd.erase = w25_erase;
diff --git a/nuttx/drivers/net/e1000.c b/nuttx/drivers/net/e1000.c
index cce575082..eb695a466 100644
--- a/nuttx/drivers/net/e1000.c
+++ b/nuttx/drivers/net/e1000.c
@@ -982,7 +982,7 @@ static int e1000_probe(uint16_t addr, pci_id_t id)
/* alloc e1000_dev memory */
- if ((dev = kzalloc(sizeof(struct e1000_dev))) == NULL)
+ if ((dev = kmm_zalloc(sizeof(struct e1000_dev))) == NULL)
{
return -1;
}
diff --git a/nuttx/drivers/power/max1704x.c b/nuttx/drivers/power/max1704x.c
index e44cb1079..fa6f1bb24 100644
--- a/nuttx/drivers/power/max1704x.c
+++ b/nuttx/drivers/power/max1704x.c
@@ -531,7 +531,7 @@ FAR struct battery_dev_s *max1704x_initialize(FAR struct i2c_dev_s *i2c,
/* Initialize the MAX1704x device structure */
- priv = (FAR struct max1704x_dev_s *)kzalloc(sizeof(struct max1704x_dev_s));
+ priv = (FAR struct max1704x_dev_s *)kmm_zalloc(sizeof(struct max1704x_dev_s));
if (priv)
{
/* Initialize the MAX1704x device structure */
diff --git a/nuttx/drivers/pwm.c b/nuttx/drivers/pwm.c
index e6d887260..3151a5786 100644
--- a/nuttx/drivers/pwm.c
+++ b/nuttx/drivers/pwm.c
@@ -588,14 +588,14 @@ int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev)
/* Allocate the upper-half data structure */
- upper = (FAR struct pwm_upperhalf_s *)kzalloc(sizeof(struct pwm_upperhalf_s));
+ upper = (FAR struct pwm_upperhalf_s *)kmm_zalloc(sizeof(struct pwm_upperhalf_s));
if (!upper)
{
pwmdbg("Allocation failed\n");
return -ENOMEM;
}
- /* Initialize the PWM device structure (it was already zeroed by kzalloc()) */
+ /* Initialize the PWM device structure (it was already zeroed by kmm_zalloc()) */
sem_init(&upper->exclsem, 0, 1);
#ifdef CONFIG_PWM_PULSECOUNT
diff --git a/nuttx/drivers/sensors/qencoder.c b/nuttx/drivers/sensors/qencoder.c
index d10db7b6b..5439dbf30 100644
--- a/nuttx/drivers/sensors/qencoder.c
+++ b/nuttx/drivers/sensors/qencoder.c
@@ -382,14 +382,14 @@ int qe_register(FAR const char *devpath, FAR struct qe_lowerhalf_s *lower)
/* Allocate the upper-half data structure */
- upper = (FAR struct qe_upperhalf_s *)kzalloc(sizeof(struct qe_upperhalf_s));
+ upper = (FAR struct qe_upperhalf_s *)kmm_zalloc(sizeof(struct qe_upperhalf_s));
if (!upper)
{
qedbg("Allocation failed\n");
return -ENOMEM;
}
- /* Initialize the PWM device structure (it was already zeroed by kzalloc()) */
+ /* Initialize the PWM device structure (it was already zeroed by kmm_zalloc()) */
sem_init(&upper->exclsem, 0, 1);
upper->lower = lower;
diff --git a/nuttx/drivers/syslog/ramlog.c b/nuttx/drivers/syslog/ramlog.c
index 7ad2602ee..0be3b454b 100644
--- a/nuttx/drivers/syslog/ramlog.c
+++ b/nuttx/drivers/syslog/ramlog.c
@@ -654,7 +654,7 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
/* Allocate a RAM logging device structure */
- priv = (struct ramlog_dev_s *)kzalloc(sizeof(struct ramlog_dev_s));
+ priv = (struct ramlog_dev_s *)kmm_zalloc(sizeof(struct ramlog_dev_s));
if (priv)
{
/* Initialize the non-zero values in the RAM logging device structure */
diff --git a/nuttx/drivers/timer.c b/nuttx/drivers/timer.c
index db0f333da..7cb212177 100644
--- a/nuttx/drivers/timer.c
+++ b/nuttx/drivers/timer.c
@@ -481,7 +481,7 @@ FAR void *timer_register(FAR const char *path,
/* Allocate the upper-half data structure */
upper = (FAR struct timer_upperhalf_s *)
- kzalloc(sizeof(struct timer_upperhalf_s));
+ kmm_zalloc(sizeof(struct timer_upperhalf_s));
if (!upper)
{
tmrdbg("Upper half allocation failed\n");
@@ -489,7 +489,7 @@ FAR void *timer_register(FAR const char *path,
}
/* Initialize the timer device structure (it was already zeroed
- * by kzalloc()).
+ * by kmm_zalloc()).
*/
//sem_init(&upper->exclsem, 0, 1);
diff --git a/nuttx/drivers/watchdog.c b/nuttx/drivers/watchdog.c
index a5826b0e6..71321c8f0 100644
--- a/nuttx/drivers/watchdog.c
+++ b/nuttx/drivers/watchdog.c
@@ -483,7 +483,7 @@ FAR void *watchdog_register(FAR const char *path,
/* Allocate the upper-half data structure */
upper = (FAR struct watchdog_upperhalf_s *)
- kzalloc(sizeof(struct watchdog_upperhalf_s));
+ kmm_zalloc(sizeof(struct watchdog_upperhalf_s));
if (!upper)
{
wddbg("Upper half allocation failed\n");
@@ -491,7 +491,7 @@ FAR void *watchdog_register(FAR const char *path,
}
/* Initialize the watchdog timer device structure (it was already zeroed
- * by kzalloc()).
+ * by kmm_zalloc()).
*/
sem_init(&upper->exclsem, 0, 1);
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c
index 1302b6395..251d22836 100644
--- a/nuttx/fs/fat/fs_fat32.c
+++ b/nuttx/fs/fat/fs_fat32.c
@@ -306,7 +306,7 @@ static int fat_open(FAR struct file *filep, const char *relpath,
* file.
*/
- ff = (struct fat_file_s *)kzalloc(sizeof(struct fat_file_s));
+ ff = (struct fat_file_s *)kmm_zalloc(sizeof(struct fat_file_s));
if (!ff)
{
ret = -ENOMEM;
@@ -1756,7 +1756,7 @@ static int fat_bind(FAR struct inode *blkdriver, const void *data,
/* Create an instance of the mountpt state structure */
- fs = (struct fat_mountpt_s *)kzalloc(sizeof(struct fat_mountpt_s));
+ fs = (struct fat_mountpt_s *)kmm_zalloc(sizeof(struct fat_mountpt_s));
if (!fs)
{
return -ENOMEM;
diff --git a/nuttx/fs/fs_automount.c b/nuttx/fs/fs_automount.c
index ff40c9230..2dc9a9b7a 100644
--- a/nuttx/fs/fs_automount.c
+++ b/nuttx/fs/fs_automount.c
@@ -546,7 +546,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
/* Allocate an auto-mounter state structure */
priv = (FAR struct automounter_state_s *)
- kzalloc(sizeof(struct automounter_state_s));
+ kmm_zalloc(sizeof(struct automounter_state_s));
if (!priv)
{
diff --git a/nuttx/fs/fs_inodereserve.c b/nuttx/fs/fs_inodereserve.c
index 82d3e6f2d..2c13513a4 100644
--- a/nuttx/fs/fs_inodereserve.c
+++ b/nuttx/fs/fs_inodereserve.c
@@ -91,7 +91,7 @@ static void inode_namecpy(char *dest, const char *src)
static FAR struct inode *inode_alloc(FAR const char *name)
{
int namelen = inode_namelen(name);
- FAR struct inode *node = (FAR struct inode*)kzalloc(FSNODE_SIZE(namelen));
+ FAR struct inode *node = (FAR struct inode*)kmm_zalloc(FSNODE_SIZE(namelen));
if (node)
{
inode_namecpy(node->i_name, name);
diff --git a/nuttx/fs/fs_select.c b/nuttx/fs/fs_select.c
index 556591b9e..f862ade33 100644
--- a/nuttx/fs/fs_select.c
+++ b/nuttx/fs/fs_select.c
@@ -129,7 +129,7 @@ int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds,
/* Allocate the descriptor list for poll() */
- pollset = (struct pollfd *)kzalloc(npfds * sizeof(struct pollfd));
+ pollset = (struct pollfd *)kmm_zalloc(npfds * sizeof(struct pollfd));
if (!pollset)
{
set_errno(ENOMEM);
diff --git a/nuttx/fs/nfs/nfs_vfsops.c b/nuttx/fs/nfs/nfs_vfsops.c
index 6654f3baf..362343d01 100644
--- a/nuttx/fs/nfs/nfs_vfsops.c
+++ b/nuttx/fs/nfs/nfs_vfsops.c
@@ -570,7 +570,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath,
/* Pre-allocate the file private data to describe the opened file. */
- np = (struct nfsnode *)kzalloc(sizeof(struct nfsnode));
+ np = (struct nfsnode *)kmm_zalloc(sizeof(struct nfsnode));
if (!np)
{
fdbg("ERROR: Failed to allocate private data\n");
@@ -1722,7 +1722,7 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data,
/* Create an instance of the mountpt state structure */
- nmp = (FAR struct nfsmount *)kzalloc(SIZEOF_nfsmount(buflen));
+ nmp = (FAR struct nfsmount *)kmm_zalloc(SIZEOF_nfsmount(buflen));
if (!nmp)
{
fdbg("ERROR: Failed to allocate mountpoint structure\n");
@@ -1772,7 +1772,7 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data,
/* Create an instance of the rpc state structure */
- rpc = (struct rpcclnt *)kzalloc(sizeof(struct rpcclnt));
+ rpc = (struct rpcclnt *)kmm_zalloc(sizeof(struct rpcclnt));
if (!rpc)
{
fdbg("ERROR: Failed to allocate rpc structure\n");
diff --git a/nuttx/fs/nfs/rpc_clnt.c b/nuttx/fs/nfs/rpc_clnt.c
index cdf3639fc..e19588404 100644
--- a/nuttx/fs/nfs/rpc_clnt.c
+++ b/nuttx/fs/nfs/rpc_clnt.c
@@ -396,7 +396,7 @@ int rpcclnt_connect(struct rpcclnt *rpc)
/* Create an instance of the socket state structure */
- so = (struct socket *)kzalloc(sizeof(struct socket));
+ so = (struct socket *)kmm_zalloc(sizeof(struct socket));
if (!so)
{
fdbg("ERROR: Failed to allocate socket structure\n");
diff --git a/nuttx/fs/nxffs/nxffs_initialize.c b/nuttx/fs/nxffs/nxffs_initialize.c
index 2aace3a7b..3fb9e2b77 100644
--- a/nuttx/fs/nxffs/nxffs_initialize.c
+++ b/nuttx/fs/nxffs/nxffs_initialize.c
@@ -175,7 +175,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd)
/* Allocate a NXFFS volume structure */
- volume = (FAR struct nxffs_volume_s *)kzalloc(sizeof(struct nxffs_volume_s));
+ volume = (FAR struct nxffs_volume_s *)kmm_zalloc(sizeof(struct nxffs_volume_s));
if (!volume)
{
return -ENOMEM;
diff --git a/nuttx/fs/nxffs/nxffs_open.c b/nuttx/fs/nxffs/nxffs_open.c
index d049ef693..07e115a15 100644
--- a/nuttx/fs/nxffs/nxffs_open.c
+++ b/nuttx/fs/nxffs/nxffs_open.c
@@ -514,7 +514,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume,
wrfile = &g_wrfile;
memset(wrfile, 0, sizeof(struct nxffs_wrfile_s));
#else
- wrfile = (FAR struct nxffs_wrfile_s *)kzalloc(sizeof(struct nxffs_wrfile_s));
+ wrfile = (FAR struct nxffs_wrfile_s *)kmm_zalloc(sizeof(struct nxffs_wrfile_s));
if (!wrfile)
{
ret = -ENOMEM;
@@ -750,7 +750,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume,
{
/* Not already open.. create a new open structure */
- ofile = (FAR struct nxffs_ofile_s *)kzalloc(sizeof(struct nxffs_ofile_s));
+ ofile = (FAR struct nxffs_ofile_s *)kmm_zalloc(sizeof(struct nxffs_ofile_s));
if (!ofile)
{
fdbg("ERROR: ofile allocation failed\n");
diff --git a/nuttx/fs/procfs/fs_procfs.c b/nuttx/fs/procfs/fs_procfs.c
index 3351d7bf8..d4471e554 100644
--- a/nuttx/fs/procfs/fs_procfs.c
+++ b/nuttx/fs/procfs/fs_procfs.c
@@ -435,7 +435,7 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath,
*/
level0 = (FAR struct procfs_level0_s *)
- kzalloc(sizeof(struct procfs_level0_s));
+ kmm_zalloc(sizeof(struct procfs_level0_s));
if (!level0)
{
@@ -514,7 +514,7 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath,
*/
level1 = (FAR struct procfs_level1_s *)
- kzalloc(sizeof(struct procfs_level1_s));
+ kmm_zalloc(sizeof(struct procfs_level1_s));
if (!level1)
{
diff --git a/nuttx/fs/procfs/fs_procfscpuload.c b/nuttx/fs/procfs/fs_procfscpuload.c
index 9d01bcad3..8641f3933 100644
--- a/nuttx/fs/procfs/fs_procfscpuload.c
+++ b/nuttx/fs/procfs/fs_procfscpuload.c
@@ -166,7 +166,7 @@ static int cpuload_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the file attributes */
- attr = (FAR struct cpuload_file_s *)kzalloc(sizeof(struct cpuload_file_s));
+ attr = (FAR struct cpuload_file_s *)kmm_zalloc(sizeof(struct cpuload_file_s));
if (!attr)
{
fdbg("ERROR: Failed to allocate file attributes\n");
diff --git a/nuttx/fs/procfs/fs_procfsproc.c b/nuttx/fs/procfs/fs_procfsproc.c
index 15625c22a..cd3976286 100644
--- a/nuttx/fs/procfs/fs_procfsproc.c
+++ b/nuttx/fs/procfs/fs_procfsproc.c
@@ -978,7 +978,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the task and node selection */
- procfile = (FAR struct proc_file_s *)kzalloc(sizeof(struct proc_file_s));
+ procfile = (FAR struct proc_file_s *)kmm_zalloc(sizeof(struct proc_file_s));
if (!procfile)
{
fdbg("ERROR: Failed to allocate file container\n");
@@ -1197,11 +1197,11 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
}
/* Allocate the directory structure. Note that the index and procentry
- * pointer are implicitly nullified by kzalloc(). Only the remaining,
+ * pointer are implicitly nullified by kmm_zalloc(). Only the remaining,
* non-zero entries will need be initialized.
*/
- procdir = (FAR struct proc_dir_s *)kzalloc(sizeof(struct proc_dir_s));
+ procdir = (FAR struct proc_dir_s *)kmm_zalloc(sizeof(struct proc_dir_s));
if (!procdir)
{
fdbg("ERROR: Failed to allocate the directory structure\n");
diff --git a/nuttx/fs/procfs/fs_procfsuptime.c b/nuttx/fs/procfs/fs_procfsuptime.c
index 2d1d02a25..0135e0717 100644
--- a/nuttx/fs/procfs/fs_procfsuptime.c
+++ b/nuttx/fs/procfs/fs_procfsuptime.c
@@ -168,7 +168,7 @@ static int uptime_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the file attributes */
- attr = (FAR struct uptime_file_s *)kzalloc(sizeof(struct uptime_file_s));
+ attr = (FAR struct uptime_file_s *)kmm_zalloc(sizeof(struct uptime_file_s));
if (!attr)
{
fdbg("ERROR: Failed to allocate file attributes\n");
diff --git a/nuttx/fs/procfs/fs_skeleton.c b/nuttx/fs/procfs/fs_skeleton.c
index 28f5ff051..55a9d769e 100644
--- a/nuttx/fs/procfs/fs_skeleton.c
+++ b/nuttx/fs/procfs/fs_skeleton.c
@@ -179,7 +179,7 @@ static int skel_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the task and attribute selection */
- priv = (FAR struct skel_file_s *)kzalloc(sizeof(struct skel_file_s));
+ priv = (FAR struct skel_file_s *)kmm_zalloc(sizeof(struct skel_file_s));
if (!priv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -268,7 +268,7 @@ static int skel_dup(FAR const struct file *oldp, FAR struct file *newp)
/* Allocate a new container to hold the task and attribute selection */
- newpriv = (FAR struct skel_file_s *)kzalloc(sizeof(struct skel_file_s));
+ newpriv = (FAR struct skel_file_s *)kmm_zalloc(sizeof(struct skel_file_s));
if (!newpriv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -305,7 +305,7 @@ static int skel_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
*/
level1 = (FAR struct skel_level1_s *)
- kzalloc(sizeof(struct skel_level1_s));
+ kmm_zalloc(sizeof(struct skel_level1_s));
if (!level1)
{
diff --git a/nuttx/fs/romfs/fs_romfs.c b/nuttx/fs/romfs/fs_romfs.c
index cbc0cbe81..c4f41f2d2 100644
--- a/nuttx/fs/romfs/fs_romfs.c
+++ b/nuttx/fs/romfs/fs_romfs.c
@@ -226,7 +226,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath,
* file.
*/
- rf = (FAR struct romfs_file_s *)kzalloc(sizeof(struct romfs_file_s));
+ rf = (FAR struct romfs_file_s *)kmm_zalloc(sizeof(struct romfs_file_s));
if (!rf)
{
fdbg("Failed to allocate private data\n", ret);
@@ -916,7 +916,7 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data,
/* Create an instance of the mountpt state structure */
- rm = (FAR struct romfs_mountpt_s *)kzalloc(sizeof(struct romfs_mountpt_s));
+ rm = (FAR struct romfs_mountpt_s *)kmm_zalloc(sizeof(struct romfs_mountpt_s));
if (!rm)
{
fdbg("Failed to allocate mountpoint structure\n");
diff --git a/nuttx/fs/smartfs/smartfs_procfs.c b/nuttx/fs/smartfs/smartfs_procfs.c
index 8f8ff3d4f..a0950bc19 100644
--- a/nuttx/fs/smartfs/smartfs_procfs.c
+++ b/nuttx/fs/smartfs/smartfs_procfs.c
@@ -179,7 +179,7 @@ static int smartfs_open(FAR struct file *filep, FAR const char *relpath,
/* Allocate a container to hold the task and attribute selection */
- priv = (FAR struct smartfs_file_s *)kzalloc(sizeof(struct smartfs_file_s));
+ priv = (FAR struct smartfs_file_s *)kmm_zalloc(sizeof(struct smartfs_file_s));
if (!priv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -268,7 +268,7 @@ static int smartfs_dup(FAR const struct file *oldp, FAR struct file *newp)
/* Allocate a new container to hold the task and attribute selection */
- newpriv = (FAR struct smartfs_file_s *)kzalloc(sizeof(struct smartfs_file_s));
+ newpriv = (FAR struct smartfs_file_s *)kmm_zalloc(sizeof(struct smartfs_file_s));
if (!newpriv)
{
fdbg("ERROR: Failed to allocate file attributes\n");
@@ -305,7 +305,7 @@ static int smartfs_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
*/
level1 = (FAR struct smartfs_level1_s *)
- kzalloc(sizeof(struct smartfs_level1_s));
+ kmm_zalloc(sizeof(struct smartfs_level1_s));
if (!level1)
{
diff --git a/nuttx/fs/smartfs/smartfs_smart.c b/nuttx/fs/smartfs/smartfs_smart.c
index 5b967bb4a..d58c0f0e5 100644
--- a/nuttx/fs/smartfs/smartfs_smart.c
+++ b/nuttx/fs/smartfs/smartfs_smart.c
@@ -1337,7 +1337,7 @@ static int smartfs_bind(FAR struct inode *blkdriver, const void *data,
/* Create an instance of the mountpt state structure */
- fs = (struct smartfs_mountpt_s *)kzalloc(sizeof(struct smartfs_mountpt_s));
+ fs = (struct smartfs_mountpt_s *)kmm_zalloc(sizeof(struct smartfs_mountpt_s));
if (!fs)
{
return -ENOMEM;
diff --git a/nuttx/graphics/nxconsole/nxcon_register.c b/nuttx/graphics/nxconsole/nxcon_register.c
index 0e660aff0..33f95520b 100644
--- a/nuttx/graphics/nxconsole/nxcon_register.c
+++ b/nuttx/graphics/nxconsole/nxcon_register.c
@@ -84,7 +84,7 @@ FAR struct nxcon_state_s *
/* Allocate the driver structure */
- priv = (FAR struct nxcon_state_s *)kzalloc(sizeof(struct nxcon_state_s));
+ priv = (FAR struct nxcon_state_s *)kmm_zalloc(sizeof(struct nxcon_state_s));
if (!priv)
{
gdbg("Failed to allocate the NX driver structure\n");
diff --git a/nuttx/include/nuttx/binfmt/elf.h b/nuttx/include/nuttx/binfmt/elf.h
index cacb80de5..9f74d5bd4 100644
--- a/nuttx/include/nuttx/binfmt/elf.h
+++ b/nuttx/include/nuttx/binfmt/elf.h
@@ -96,7 +96,7 @@ struct elf_loadinfo_s
* ELF program image.
*
* If CONFIG_ARCH_ADDRENV=n, elfalloc will be allocated using kmm_malloc() (or
- * kzalloc()). If CONFIG_ARCH_ADDRENV-y, then elfalloc will be allocated using
+ * kmm_zalloc()). If CONFIG_ARCH_ADDRENV-y, then elfalloc will be allocated using
* up_addrenv_create(). In either case, there will be a unique instance
* of elfalloc (and stack) for each instance of a process.
*
diff --git a/nuttx/include/nuttx/binfmt/nxflat.h b/nuttx/include/nuttx/binfmt/nxflat.h
index 2777785e3..83abbb000 100644
--- a/nuttx/include/nuttx/binfmt/nxflat.h
+++ b/nuttx/include/nuttx/binfmt/nxflat.h
@@ -78,7 +78,7 @@ struct nxflat_loadinfo_s
* referenced as data (other than the stack which is separately allocated).
*
* If CONFIG_ARCH_ADDRENV=n, DSpace will be allocated using kmm_malloc() (or
- * kzalloc()). If CONFIG_ARCH_ADDRENV-y, then DSpace will be allocated using
+ * kmm_zalloc()). If CONFIG_ARCH_ADDRENV-y, then DSpace will be allocated using
* up_addrenv_create(). In either case, there will be a unique instance
* of DSpace (and stack) for each instance of a process.
*/
diff --git a/nuttx/mm/kmm_zalloc.c b/nuttx/mm/kmm_zalloc.c
index db14972ee..9cbc5081a 100644
--- a/nuttx/mm/kmm_zalloc.c
+++ b/nuttx/mm/kmm_zalloc.c
@@ -52,7 +52,7 @@
****************************************************************************/
/************************************************************************
- * Name: kzalloc
+ * Name: kmm_zalloc
*
* Description:
* Allocate and zero memory from the kernel heap.
@@ -65,7 +65,7 @@
*
************************************************************************/
-FAR void *kzalloc(size_t size)
+FAR void *kmm_zalloc(size_t size)
{
return mm_zalloc(&g_kmmheap, size);
}
diff --git a/nuttx/mm/umm_zalloc.c b/nuttx/mm/umm_zalloc.c
index 84da8c37b..d4d5bf5fd 100644
--- a/nuttx/mm/umm_zalloc.c
+++ b/nuttx/mm/umm_zalloc.c
@@ -54,7 +54,7 @@
****************************************************************************/
/************************************************************************
- * Name: kzalloc
+ * Name: zalloc
*
* Description:
* Allocate and zero memory from the user heap.
diff --git a/nuttx/net/igmp/igmp_group.c b/nuttx/net/igmp/igmp_group.c
index 632c29fc4..89034c68d 100644
--- a/nuttx/net/igmp/igmp_group.c
+++ b/nuttx/net/igmp/igmp_group.c
@@ -147,7 +147,7 @@ static FAR sq_queue_t g_freelist;
static inline FAR struct igmp_group_s *igmp_grpheapalloc(void)
{
- return (FAR struct igmp_group_s *)kzalloc(sizeof(struct igmp_group_s));
+ return (FAR struct igmp_group_s *)kmm_zalloc(sizeof(struct igmp_group_s));
}
/****************************************************************************
diff --git a/nuttx/net/tcp/tcp_backlog.c b/nuttx/net/tcp/tcp_backlog.c
index 2ed7523dd..4d2ecbc2c 100644
--- a/nuttx/net/tcp/tcp_backlog.c
+++ b/nuttx/net/tcp/tcp_backlog.c
@@ -114,7 +114,7 @@ int tcp_backlogcreate(FAR struct tcp_conn_s *conn, int nblg)
/* Then allocate that much */
- bls = (FAR struct tcp_backlog_s *)kzalloc(size);
+ bls = (FAR struct tcp_backlog_s *)kmm_zalloc(size);
if (!bls)
{
nlldbg("Failed to allocate backlog\n");
diff --git a/nuttx/sched/group/group_create.c b/nuttx/sched/group/group_create.c
index 5635cdc0b..2f41cab05 100644
--- a/nuttx/sched/group/group_create.c
+++ b/nuttx/sched/group/group_create.c
@@ -184,7 +184,7 @@ int group_allocate(FAR struct task_tcb_s *tcb)
/* Allocate the group structure and assign it to the TCB */
- group = (FAR struct task_group_s *)kzalloc(sizeof(struct task_group_s));
+ group = (FAR struct task_group_s *)kmm_zalloc(sizeof(struct task_group_s));
if (!group)
{
return -ENOMEM;
diff --git a/nuttx/sched/mqueue/mq_open.c b/nuttx/sched/mqueue/mq_open.c
index c7de6c745..db1012788 100644
--- a/nuttx/sched/mqueue/mq_open.c
+++ b/nuttx/sched/mqueue/mq_open.c
@@ -156,7 +156,7 @@ mqd_t mq_open(const char *mq_name, int oflags, ...)
* of the message queue name+1.
*/
- msgq = (FAR msgq_t*)kzalloc(SIZEOF_MQ_HEADER + namelen + 1);
+ msgq = (FAR msgq_t*)kmm_zalloc(SIZEOF_MQ_HEADER + namelen + 1);
if (msgq)
{
/* Create a message queue descriptor for the TCB */
diff --git a/nuttx/sched/pthread/pthread_create.c b/nuttx/sched/pthread/pthread_create.c
index 036818a53..d777d0cc8 100644
--- a/nuttx/sched/pthread/pthread_create.c
+++ b/nuttx/sched/pthread/pthread_create.c
@@ -247,7 +247,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
/* Allocate a TCB for the new task. */
- ptcb = (FAR struct pthread_tcb_s *)kzalloc(sizeof(struct pthread_tcb_s));
+ ptcb = (FAR struct pthread_tcb_s *)kmm_zalloc(sizeof(struct pthread_tcb_s));
if (!ptcb)
{
sdbg("ERROR: Failed to allocate TCB\n");
@@ -281,7 +281,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
/* Allocate a detachable structure to support pthread_join logic */
- pjoin = (FAR struct join_s*)kzalloc(sizeof(struct join_s));
+ pjoin = (FAR struct join_s*)kmm_zalloc(sizeof(struct join_s));
if (!pjoin)
{
sdbg("ERROR: Failed to allocate join\n");
diff --git a/nuttx/sched/task/task_create.c b/nuttx/sched/task/task_create.c
index 6289085fa..ca0ed892f 100644
--- a/nuttx/sched/task/task_create.c
+++ b/nuttx/sched/task/task_create.c
@@ -115,7 +115,7 @@ static int thread_create(FAR const char *name, uint8_t ttype, int priority,
/* Allocate a TCB for the new task. */
- tcb = (FAR struct task_tcb_s *)kzalloc(sizeof(struct task_tcb_s));
+ tcb = (FAR struct task_tcb_s *)kmm_zalloc(sizeof(struct task_tcb_s));
if (!tcb)
{
sdbg("ERROR: Failed to allocate TCB\n");
diff --git a/nuttx/sched/task/task_vfork.c b/nuttx/sched/task/task_vfork.c
index 35f464a21..6b073b421 100644
--- a/nuttx/sched/task/task_vfork.c
+++ b/nuttx/sched/task/task_vfork.c
@@ -136,7 +136,7 @@ FAR struct task_tcb_s *task_vforksetup(start_t retaddr)
/* Allocate a TCB for the child task. */
- child = (FAR struct task_tcb_s *)kzalloc(sizeof(struct task_tcb_s));
+ child = (FAR struct task_tcb_s *)kmm_zalloc(sizeof(struct task_tcb_s));
if (!child)
{
sdbg("ERROR: Failed to allocate TCB\n");