OSDN Git Service
(root)
/
uclinux-h8
/
uClibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8ff1de7
)
Define MALLOC_SET_SIZE to take the user-address rather than the base-address.
author
Miles Bader
<miles@lsi.nec.co.jp>
Tue, 30 Jul 2002 09:45:58 +0000
(09:45 -0000)
committer
Miles Bader
<miles@lsi.nec.co.jp>
Tue, 30 Jul 2002 09:45:58 +0000
(09:45 -0000)
libc/stdlib/malloc/malloc.h
patch
|
blob
|
history
diff --git
a/libc/stdlib/malloc/malloc.h
b/libc/stdlib/malloc/malloc.h
index
f08f4bf
..
8abc9ed
100644
(file)
--- a/
libc/stdlib/malloc/malloc.h
+++ b/
libc/stdlib/malloc/malloc.h
@@
-56,11
+56,11
@@
#define MALLOC_BASE(addr) ((void *)((char *)addr - MALLOC_ALIGNMENT))
/* Return the size of a malloc allocation, given the user address. */
#define MALLOC_SIZE(addr) (*(size_t *)MALLOC_BASE(addr))
#define MALLOC_BASE(addr) ((void *)((char *)addr - MALLOC_ALIGNMENT))
/* Return the size of a malloc allocation, given the user address. */
#define MALLOC_SIZE(addr) (*(size_t *)MALLOC_BASE(addr))
+/* Sets the size of a malloc allocation, given the user address. */
+#define MALLOC_SET_SIZE(addr, size) (*(size_t *)MALLOC_BASE(addr) = (size))
/* Return the user address of a malloc allocation, given the base address. */
#define MALLOC_ADDR(base) ((void *)((char *)base + MALLOC_ALIGNMENT))
/* Return the user address of a malloc allocation, given the base address. */
#define MALLOC_ADDR(base) ((void *)((char *)base + MALLOC_ALIGNMENT))
-/* Sets the size of a malloc allocation, given the base address. */
-#define MALLOC_SET_SIZE(base, size) (*(size_t *)(base) = (size))
#ifdef __UCLIBC_HAS_THREADS__
#ifdef __UCLIBC_HAS_THREADS__