projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6e3b1b6
)
(mem2chunk_check): Check alignment of mem pointer, not of the computed chunk.
author
drepper
<drepper>
Mon, 27 Jan 2003 18:32:36 +0000
(18:32 +0000)
committer
drepper
<drepper>
Mon, 27 Jan 2003 18:32:36 +0000
(18:32 +0000)
malloc/hooks.c
patch
|
blob
|
history
diff --git
a/malloc/hooks.c
b/malloc/hooks.c
index
0bd3e2a
..
cf6642c
100644
(file)
--- a/
malloc/hooks.c
+++ b/
malloc/hooks.c
@@
-1,5
+1,5
@@
/* Malloc implementation for multiple threads without lock contention.
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001,
02
Free Software Foundation, Inc.
+ Copyright (C) 2001,
2002, 2003
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@@
-162,8
+162,8
@@
mem2chunk_check(mem) Void_t* mem;
INTERNAL_SIZE_T sz, c;
unsigned char magic;
INTERNAL_SIZE_T sz, c;
unsigned char magic;
+ if(!aligned_OK(mem)) return NULL;
p = mem2chunk(mem);
p = mem2chunk(mem);
- if(!aligned_OK(p)) return NULL;
if( (char*)p>=mp_.sbrk_base &&
(char*)p<(mp_.sbrk_base+main_arena.system_mem) ) {
/* Must be a chunk in conventional heap memory. */
if( (char*)p>=mp_.sbrk_base &&
(char*)p<(mp_.sbrk_base+main_arena.system_mem) ) {
/* Must be a chunk in conventional heap memory. */