* [committed 0/2] Trivial malloc cleanups
@ 2021-07-08 13:16 Siddhesh Poyarekar
2021-07-08 13:16 ` [committed 1/2] Move mcheck symbol from stdlib to malloc Siddhesh Poyarekar
2021-07-08 13:16 ` [committed 2/2] _int_realloc is static Siddhesh Poyarekar
0 siblings, 2 replies; 3+ messages in thread
From: Siddhesh Poyarekar @ 2021-07-08 13:16 UTC (permalink / raw)
To: libc-alpha
A couple of minor cleanups that have no effect on the generated
binaries.
Siddhesh Poyarekar (2):
Move mcheck symbol from stdlib to malloc
_int_realloc is static
malloc/Versions | 2 +-
malloc/malloc.c | 4 ++--
stdlib/Versions | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [committed 1/2] Move mcheck symbol from stdlib to malloc
2021-07-08 13:16 [committed 0/2] Trivial malloc cleanups Siddhesh Poyarekar
@ 2021-07-08 13:16 ` Siddhesh Poyarekar
2021-07-08 13:16 ` [committed 2/2] _int_realloc is static Siddhesh Poyarekar
1 sibling, 0 replies; 3+ messages in thread
From: Siddhesh Poyarekar @ 2021-07-08 13:16 UTC (permalink / raw)
To: libc-alpha
It is defined in malloc, so it belongs there. Verified on x86_64 that
the built libraries are identical despite this change.
---
malloc/Versions | 2 +-
stdlib/Versions | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/malloc/Versions b/malloc/Versions
index 62e4698a08..470a940666 100644
--- a/malloc/Versions
+++ b/malloc/Versions
@@ -26,7 +26,7 @@ libc {
# m*
mallinfo; malloc; malloc_get_state; malloc_set_state; malloc_stats;
- malloc_trim; malloc_usable_size; mallopt; memalign; mprobe; mtrace;
+ malloc_trim; malloc_usable_size; mallopt; mcheck; memalign; mprobe; mtrace;
muntrace;
# o*
diff --git a/stdlib/Versions b/stdlib/Versions
index 9e665d4c26..5e9099a153 100644
--- a/stdlib/Versions
+++ b/stdlib/Versions
@@ -40,7 +40,7 @@ libc {
# m*
mblen; mbrlen; mbrtowc; mbsinit; mbsnrtowcs; mbsrtowcs; mbstowcs;
- mbtowc; mcheck; mcount; mrand48; mrand48_r;
+ mbtowc; mcount; mrand48; mrand48_r;
# n*
nrand48; nrand48_r;
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [committed 2/2] _int_realloc is static
2021-07-08 13:16 [committed 0/2] Trivial malloc cleanups Siddhesh Poyarekar
2021-07-08 13:16 ` [committed 1/2] Move mcheck symbol from stdlib to malloc Siddhesh Poyarekar
@ 2021-07-08 13:16 ` Siddhesh Poyarekar
1 sibling, 0 replies; 3+ messages in thread
From: Siddhesh Poyarekar @ 2021-07-08 13:16 UTC (permalink / raw)
To: libc-alpha
_int_realloc is correctly declared at the top to be static, but
incorrectly defined without the static keyword. Fix that. The
generated binaries have identical code.
---
malloc/malloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/malloc/malloc.c b/malloc/malloc.c
index a3525f71da..0253453f27 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4822,8 +4822,8 @@ static void malloc_consolidate(mstate av)
------------------------------ realloc ------------------------------
*/
-void*
-_int_realloc(mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
+static void *
+_int_realloc (mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
INTERNAL_SIZE_T nb)
{
mchunkptr newp; /* chunk to return */
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-08 13:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 13:16 [committed 0/2] Trivial malloc cleanups Siddhesh Poyarekar
2021-07-08 13:16 ` [committed 1/2] Move mcheck symbol from stdlib to malloc Siddhesh Poyarekar
2021-07-08 13:16 ` [committed 2/2] _int_realloc is static Siddhesh Poyarekar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).