summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/malloc
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-31 15:21:24 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-31 15:21:24 +0000
commitdd7d7e3f138d1835d153c316f3d771e40dc641ba (patch)
tree7427232d1e9759028490f843152a83a4bbbab7db /libc/stdlib/malloc
parent89ed2cccba266f7738ceb445e4d43103c08cbe75 (diff)
downloaduClibc-alpine-dd7d7e3f138d1835d153c316f3d771e40dc641ba.tar.bz2
uClibc-alpine-dd7d7e3f138d1835d153c316f3d771e40dc641ba.tar.xz
Synch with trunk at rev 22997.
Basically trailing whitespaces removal, fix non standard keywords asm -> __asm__ inline -> __inline__ and some minor changes on trunk. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/stdlib/malloc')
-rw-r--r--libc/stdlib/malloc/heap.h10
-rw-r--r--libc/stdlib/malloc/heap_alloc.c2
-rw-r--r--libc/stdlib/malloc/heap_alloc_at.c2
-rw-r--r--libc/stdlib/malloc/heap_free.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/libc/stdlib/malloc/heap.h b/libc/stdlib/malloc/heap.h
index 38ec41cbf..6505cd223 100644
--- a/libc/stdlib/malloc/heap.h
+++ b/libc/stdlib/malloc/heap.h
@@ -141,7 +141,7 @@ extern void __heap_check (struct heap *heap, const char *str);
/* Delete the free-area FA from HEAP. */
-static inline void
+static __inline__ void
__heap_delete (struct heap *heap, struct heap_free_area *fa)
{
if (fa->next)
@@ -156,7 +156,7 @@ __heap_delete (struct heap *heap, struct heap_free_area *fa)
/* Link the free-area FA between the existing free-area's PREV and NEXT in
HEAP. PREV and NEXT may be 0; if PREV is 0, FA is installed as the
first free-area. */
-static inline void
+static __inline__ void
__heap_link_free_area (struct heap *heap, struct heap_free_area *fa,
struct heap_free_area *prev,
struct heap_free_area *next)
@@ -175,7 +175,7 @@ __heap_link_free_area (struct heap *heap, struct heap_free_area *fa,
/* Update the mutual links between the free-areas PREV and FA in HEAP.
PREV may be 0, in which case FA is installed as the first free-area (but
FA may not be 0). */
-static inline void
+static __inline__ void
__heap_link_free_area_after (struct heap *heap,
struct heap_free_area *fa,
struct heap_free_area *prev)
@@ -191,7 +191,7 @@ __heap_link_free_area_after (struct heap *heap,
free-area's PREV and NEXT in HEAP, and return a pointer to its header.
PREV and NEXT may be 0; if PREV is 0, MEM is installed as the first
free-area. */
-static inline struct heap_free_area *
+static __inline__ struct heap_free_area *
__heap_add_free_area (struct heap *heap, void *mem, size_t size,
struct heap_free_area *prev,
struct heap_free_area *next)
@@ -209,7 +209,7 @@ __heap_add_free_area (struct heap *heap, void *mem, size_t size,
/* Allocate SIZE bytes from the front of the free-area FA in HEAP, and
return the amount actually allocated (which may be more than SIZE). */
-static inline size_t
+static __inline__ size_t
__heap_free_area_alloc (struct heap *heap,
struct heap_free_area *fa, size_t size)
{
diff --git a/libc/stdlib/malloc/heap_alloc.c b/libc/stdlib/malloc/heap_alloc.c
index f8d596506..9f5fd6c1a 100644
--- a/libc/stdlib/malloc/heap_alloc.c
+++ b/libc/stdlib/malloc/heap_alloc.c
@@ -27,7 +27,7 @@ __heap_alloc (struct heap *heap, size_t *size)
void *mem = 0;
_size = HEAP_ADJUST_SIZE (_size);
-
+
if (_size < sizeof (struct heap_free_area))
/* Because we sometimes must use a freed block to hold a free-area node,
we must make sure that every allocated block can hold one. */
diff --git a/libc/stdlib/malloc/heap_alloc_at.c b/libc/stdlib/malloc/heap_alloc_at.c
index 296c6e552..a65140fea 100644
--- a/libc/stdlib/malloc/heap_alloc_at.c
+++ b/libc/stdlib/malloc/heap_alloc_at.c
@@ -32,7 +32,7 @@ __heap_alloc_at (struct heap *heap, void *mem, size_t size)
for (fa = heap->free_areas; fa; fa = fa->next)
{
void *fa_mem = HEAP_FREE_AREA_START (fa);
- if (fa_mem <= mem)
+ if (fa_mem <= mem)
{
if (fa_mem == mem && fa->size >= size)
/* FA has the right addr, and is big enough! */
diff --git a/libc/stdlib/malloc/heap_free.c b/libc/stdlib/malloc/heap_free.c
index 8bc740dd8..1c4634c55 100644
--- a/libc/stdlib/malloc/heap_free.c
+++ b/libc/stdlib/malloc/heap_free.c
@@ -72,7 +72,7 @@ __heap_free (struct heap *heap, void *mem, size_t size)
/* The new descriptor is at the end of the extended block,
SIZE bytes later than the old descriptor. */
fa = (struct heap_free_area *)((char *)fa + size);
- /* Update links with the neighbors in the list. */
+ /* Update links with the neighbors in the list. */
__heap_link_free_area (heap, fa, prev_fa, next_fa);
}
}