public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: jordy@wserv.com (Jordan Mendelson)
Cc: libc-hacker@sourceware.cygnus.com (GNU C Library)
Subject: A patch for malloc.
Date: Fri, 06 Aug 1999 14:33:00 -0000	[thread overview]
Message-ID: <19990806213245.E0AB457BB@ocean.lucon.org> (raw)
In-Reply-To: <37AB46E7.7228E760@wserv.com>

> 
> 
> This one is a bit hard to get at, but this is what I see:
> 

Please try this patch. __libc_pagesize handling in glibc 2.1.2 and 2.2
is wrong since __pthread_initialize will call malloc () with wrong
__libc_pagesize. This patch fixes glibc 2.1.2.

Ulrich, please fix both glibc 2.1.2 and 2.2.

Thanks.


H.J.
---
Fri Aug  6 14:21:24 1999  H.J. Lu  <hjl@gnu.org>

        * malloc/malloc.c (ptmalloc_init): Make sure __libc_pagesize is
        initiailized before any calls to malloc.

--- ../../import/glibc-2.1/libc/malloc/malloc.c	Wed Jul 21 07:30:38 1999
+++ malloc/malloc.c	Fri Aug  6 14:25:42 1999
@@ -1649,6 +1649,9 @@ ptmalloc_init __MALLOC_P((void))
 
   if(__malloc_initialized >= 0) return;
   __malloc_initialized = 0;
+#ifdef _LIBC
+  __libc_pagesize = __getpagesize();
+#endif
 #ifndef NO_THREADS
 #if defined _LIBC || defined MALLOC_HOOKS
   /* With some threads implementations, creating thread-specific data
@@ -1663,7 +1666,6 @@ ptmalloc_init __MALLOC_P((void))
   /* Initialize the pthreads interface. */
   if (__pthread_initialize != NULL)
     __pthread_initialize();
-  __libc_pagesize = __getpagesize();
 #endif
   mutex_init(&main_arena.mutex);
   mutex_init(&list_lock);

       reply	other threads:[~1999-08-06 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <37AB46E7.7228E760@wserv.com>
1999-08-06 14:33 ` H.J. Lu [this message]
1999-08-06 15:59   ` Ulrich Drepper
1998-08-11  7:38 H.J. Lu
1998-08-11 14:02 ` Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990806213245.E0AB457BB@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=jordy@wserv.com \
    --cc=libc-hacker@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).