summaryrefslogtreecommitdiff
path: root/nuttx/binfmt/libelf
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-09 21:12:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-09 21:12:20 +0000
commitdda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5 (patch)
tree0af32db840a032a50312791977b7d129def1d5b3 /nuttx/binfmt/libelf
parent2ac33dcffabd9422659c3b013ed8624c09ae90e4 (diff)
downloadpx4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.tar.gz
px4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.tar.bz2
px4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.zip
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
Diffstat (limited to 'nuttx/binfmt/libelf')
-rw-r--r--nuttx/binfmt/libelf/libelf_addrenv.c6
-rw-r--r--nuttx/binfmt/libelf/libelf_ctors.c2
-rw-r--r--nuttx/binfmt/libelf/libelf_dtors.c2
-rw-r--r--nuttx/binfmt/libelf/libelf_iobuffer.c2
-rw-r--r--nuttx/binfmt/libelf/libelf_unload.c4
5 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/binfmt/libelf/libelf_addrenv.c b/nuttx/binfmt/libelf/libelf_addrenv.c
index 193062a54..d2b9870b6 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 (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,
* there will be a unique instance of elfalloc (and stack) for each
* instance of a process.
@@ -116,7 +116,7 @@ int elf_addrenv_alloc(FAR struct elf_loadinfo_s *loadinfo, size_t envsize)
#else
/* Allocate memory to hold the ELF image */
- loadinfo->elfalloc = (uintptr_t)kzalloc(envsize);
+ loadinfo->elfalloc = (uintptr_t)kuzalloc(envsize);
if (!loadinfo->elfalloc)
{
return -ENOMEM;
@@ -167,7 +167,7 @@ void elf_addrenv_free(FAR struct elf_loadinfo_s *loadinfo)
if (loadinfo->elfalloc != 0)
{
- kfree((FAR void *)loadinfo->elfalloc);
+ kufree((FAR void *)loadinfo->elfalloc);
loadinfo->elfalloc = 0;
}
diff --git a/nuttx/binfmt/libelf/libelf_ctors.c b/nuttx/binfmt/libelf/libelf_ctors.c
index 20f1256e2..af9c7bba4 100644
--- a/nuttx/binfmt/libelf/libelf_ctors.c
+++ b/nuttx/binfmt/libelf/libelf_ctors.c
@@ -163,7 +163,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo)
{
/* 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)
{
bdbg("Failed to allocate memory for .ctors\n");
diff --git a/nuttx/binfmt/libelf/libelf_dtors.c b/nuttx/binfmt/libelf/libelf_dtors.c
index c0c73a337..638284f0b 100644
--- a/nuttx/binfmt/libelf/libelf_dtors.c
+++ b/nuttx/binfmt/libelf/libelf_dtors.c
@@ -163,7 +163,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo)
{
/* 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)
{
bdbg("Failed to allocate memory for .dtors\n");
diff --git a/nuttx/binfmt/libelf/libelf_iobuffer.c b/nuttx/binfmt/libelf/libelf_iobuffer.c
index ead99ca09..b2d54b3ca 100644
--- a/nuttx/binfmt/libelf/libelf_iobuffer.c
+++ b/nuttx/binfmt/libelf/libelf_iobuffer.c
@@ -1,7 +1,7 @@
/****************************************************************************
* 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>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/binfmt/libelf/libelf_unload.c b/nuttx/binfmt/libelf/libelf_unload.c
index 539e5faf7..7f7a3cf91 100644
--- a/nuttx/binfmt/libelf/libelf_unload.c
+++ b/nuttx/binfmt/libelf/libelf_unload.c
@@ -92,7 +92,7 @@ int elf_unload(struct elf_loadinfo_s *loadinfo)
#ifdef CONFIG_BINFMT_CONSTRUCTORS
if (loadinfo->ctoralloc != 0)
{
- kfree(loadinfo->ctoralloc);
+ kufree(loadinfo->ctoralloc);
loadinfo->ctoralloc = NULL;
}
@@ -101,7 +101,7 @@ int elf_unload(struct elf_loadinfo_s *loadinfo)
if (loadinfo->dtoralloc != 0)
{
- kfree(loadinfo->dtoralloc);
+ kufree(loadinfo->dtoralloc);
loadinfo->dtoralloc = NULL;
}