diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-31 17:26:36 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-31 17:26:36 -0600 |
commit | 39c90ce1ce01a0b45451df19c1635240d47aaf29 (patch) | |
tree | 3814c0a5ce1961e161e268801e0529a926100ffb /nuttx/binfmt | |
parent | e4f3869daedaf22dd224285cc7f0373e0a5025d2 (diff) | |
download | px4-nuttx-39c90ce1ce01a0b45451df19c1635240d47aaf29.tar.gz px4-nuttx-39c90ce1ce01a0b45451df19c1635240d47aaf29.tar.bz2 px4-nuttx-39c90ce1ce01a0b45451df19c1635240d47aaf29.zip |
Rename kmalloc to kmm_malloc for consistency
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/binfmt_exepath.c | 4 | ||||
-rw-r--r-- | nuttx/binfmt/binfmt_schedunload.c | 12 | ||||
-rw-r--r-- | nuttx/binfmt/libelf/libelf_iobuffer.c | 2 | ||||
-rw-r--r-- | nuttx/binfmt/libelf/libelf_sections.c | 2 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_addrenv.c | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/nuttx/binfmt/binfmt_exepath.c b/nuttx/binfmt/binfmt_exepath.c index af69499d1..1e05d55f3 100644 --- a/nuttx/binfmt/binfmt_exepath.c +++ b/nuttx/binfmt/binfmt_exepath.c @@ -124,7 +124,7 @@ EXEPATH_HANDLE exepath_init(void) /* Allocate a container for the PATH variable contents */ - exepath = (FAR struct exepath_s *)kmalloc(SIZEOF_EXEPATH_S(strlen(path) + 1)); + exepath = (FAR struct exepath_s *)kmm_malloc(SIZEOF_EXEPATH_S(strlen(path) + 1)); if (!exepath) { /* Ooops.. we are out of memory */ @@ -230,7 +230,7 @@ FAR char *exepath_next(EXEPATH_HANDLE handle, FAR const char *relpath) } pathlen = strlen(path) + strlen(relpath) + 2; - fullpath = (FAR char *)kmalloc(pathlen); + fullpath = (FAR char *)kmm_malloc(pathlen); if (!fullpath) { /* Failed to allocate memory */ diff --git a/nuttx/binfmt/binfmt_schedunload.c b/nuttx/binfmt/binfmt_schedunload.c index cedd940c6..cc9c84805 100644 --- a/nuttx/binfmt/binfmt_schedunload.c +++ b/nuttx/binfmt/binfmt_schedunload.c @@ -73,7 +73,7 @@ FAR struct binary_s *g_unloadhead; * * Description: * If CONFIG_SCHED_HAVE_PARENT is defined then schedul_unload() will - * manage instances of struct binary_s allocated with kmalloc. It + * manage instances of struct binary_s allocated with kmm_malloc. It * will keep the binary data in a link list and when SIGCHLD is received * (meaning that the task has exit'ed, schedul_unload() will find the * data, unload the module, and free the structure. @@ -82,7 +82,7 @@ FAR struct binary_s *g_unloadhead; * * Input Parameter: * pid - The task ID of the child task - * bin - This structure must have been allocated with kmalloc() and must + * bin - This structure must have been allocated with kmm_malloc() and must * persist until the task unloads * @@ -116,7 +116,7 @@ static void unload_list_add(pid_t pid, FAR struct binary_s *bin) * * Description: * If CONFIG_SCHED_HAVE_PARENT is defined then schedul_unload() will - * manage instances of struct binary_s allocated with kmalloc. It + * manage instances of struct binary_s allocated with kmm_malloc. It * will keep the binary data in a link list and when SIGCHLD is received * (meaning that the task has exit'ed, schedul_unload() will find the * data, unload the module, and free the structure. @@ -187,7 +187,7 @@ static FAR struct binary_s *unload_list_remove(pid_t pid) * Description: * If CONFIG_SCHED_HAVE_PARENT is defined, this function may be called to * automatically unload the module when task exits. It assumes that - * bin was allocated with kmalloc() or friends and will also automatically + * bin was allocated with kmm_malloc() or friends and will also automatically * free the structure with kmm_free() when the task exists. * * Input Parameter: @@ -245,13 +245,13 @@ static void unload_callback(int signo, siginfo_t *info, void *ucontext) * If CONFIG_SCHED_HAVE_PARENT is defined, this function may be called by * the parent of the newly created task to automatically unload the * module when the task exits. This assumes that (1) the caller is the - * parent of the created task, (2) that bin was allocated with kmalloc() + * parent of the created task, (2) that bin was allocated with kmm_malloc() * or friends. It will also automatically free the structure with kmm_free() * after unloading the module. * * Input Parameter: * pid - The task ID of the child task - * bin - This structure must have been allocated with kmalloc() and must + * bin - This structure must have been allocated with kmm_malloc() and must * persist until the task unloads * * Returned Value: diff --git a/nuttx/binfmt/libelf/libelf_iobuffer.c b/nuttx/binfmt/libelf/libelf_iobuffer.c index 3e27c73e3..6e97781a3 100644 --- a/nuttx/binfmt/libelf/libelf_iobuffer.c +++ b/nuttx/binfmt/libelf/libelf_iobuffer.c @@ -84,7 +84,7 @@ int elf_allocbuffer(FAR struct elf_loadinfo_s *loadinfo) { /* No.. allocate one now */ - loadinfo->iobuffer = (FAR uint8_t *)kmalloc(CONFIG_ELF_BUFFERSIZE); + loadinfo->iobuffer = (FAR uint8_t *)kmm_malloc(CONFIG_ELF_BUFFERSIZE); if (!loadinfo->iobuffer) { bdbg("Failed to allocate an I/O buffer\n"); diff --git a/nuttx/binfmt/libelf/libelf_sections.c b/nuttx/binfmt/libelf/libelf_sections.c index 1b749ba8b..23f7cc031 100644 --- a/nuttx/binfmt/libelf/libelf_sections.c +++ b/nuttx/binfmt/libelf/libelf_sections.c @@ -211,7 +211,7 @@ int elf_loadshdrs(FAR struct elf_loadinfo_s *loadinfo) /* Allocate memory to hold a working copy of the sector header table */ - loadinfo->shdr = (FAR Elf32_Shdr*)kmalloc(shdrsize); + loadinfo->shdr = (FAR Elf32_Shdr*)kmm_malloc(shdrsize); if (!loadinfo->shdr) { bdbg("Failed to allocate the section header table. Size: %ld\n", (long)shdrsize); diff --git a/nuttx/binfmt/libnxflat/libnxflat_addrenv.c b/nuttx/binfmt/libnxflat/libnxflat_addrenv.c index 7378c2438..7ee0376d2 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_addrenv.c +++ b/nuttx/binfmt/libnxflat/libnxflat_addrenv.c @@ -95,7 +95,7 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize) /* Allocate the struct dspace_s container for the D-Space allocation */ - dspace = (FAR struct dspace_s *)kmalloc(sizeof(struct dspace_s)); + dspace = (FAR struct dspace_s *)kmm_malloc(sizeof(struct dspace_s)); if (dspace == 0) { bdbg("ERROR: Failed to allocate DSpace\n"); |