Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
2004-11-13  Ulrich Drepper  <drepper@redhat.com>

	* malloc/malloc.c (malloc_state): stat_lock_* elements need only
	be defined if THREAD_STATS is defined.  Remove pad0_ since it does
	not align with cache line sizes in general anyway.
  • Loading branch information
Ulrich Drepper committed Nov 13, 2004
1 parent c120d94 commit 4f27c49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2004-11-13 Ulrich Drepper <drepper@redhat.com>

* malloc/malloc.c (malloc_state): stat_lock_* elements need only
be defined if THREAD_STATS is defined. Remove pad0_ since it does
not align with cache line sizes in general anyway.

2004-11-13 Jakub Jelinek <jakub@redhat.com>

* elf/rtld.c (print_statistics): Avoid segfaults if not all namespaces
Expand Down
4 changes: 3 additions & 1 deletion malloc/malloc.c
Expand Up @@ -2192,10 +2192,12 @@ typedef struct malloc_chunk* mfastbinptr;
struct malloc_state {
/* Serialize access. */
mutex_t mutex;
// Should we have padding to move the mutex to its own cache line?

#if THREAD_STATS
/* Statistics for locking. Only used if THREAD_STATS is defined. */
long stat_lock_direct, stat_lock_loop, stat_lock_wait;
long pad0_[1]; /* try to give the mutex its own cacheline */
#endif

/* The maximum chunk size to be eligible for fastbin */
INTERNAL_SIZE_T max_fast; /* low 2 bits used as flags */
Expand Down

0 comments on commit 4f27c49

Please sign in to comment.