This discussion is archived
4 Replies Latest reply: Apr 26, 2010 7:38 PM by Robert Cohen RSS

malloc() and pmap reporting different starting-address of requested memory

807559 Newbie
Currently Being Moderated
Does anyone have an idea, why pmap always reports a starting-address of an memory-block, that was requested with malloc(), with an offset of 24 bytes (hex 18) compared to the address, that malloc() returns ??

example:

List of allocated blocks
========================

Block# 0 - 8 MB - [fe800018] <- pointer, that was returned by malloc() / pmap: FE800000 (see below)
Block# 1 - 16 MB - [fd400018] <- pointer, that was returned by malloc() / pmap: FD400000 (see below)
Block# 2 - 32 MB - [fb000018] <- pointer, that was returned by malloc() / pmap: FB000000 (see below)
Block# 3 - 64 MB - [f6c00018] <- pointer, that was returned by malloc() / pmap: F6C00000 (see below)
Block# 4 - 128 MB - [ee800018] <- pointer, that was returned by malloc() / pmap: EE800000 (see below)
Block# 5 - 256 MB - [de400018] <- pointer, that was returned by malloc() / pmap: DE400000 (see below)
Block# 6 - 512 MB - [be000018] <- pointer, that was returned by malloc() / pmap: BE000000 (see below)

-bash-3.00$ pmap 25507
25507: ./mdtestsuite
00010000 8K r-x-- /export/home/mdiemar/dev/mdtestsuite
00020000 8K rwx-- /export/home/mdiemar/dev/mdtestsuite
BE000000 524288K rw--- [ anon ]
DE000000 8K rw--- [ anon ]
DE400000 262144K rw--- [ anon ]
EE400000 8K rw--- [ anon ]
EE800000 131072K rw--- [ anon ]
F6800000 8K rw--- [ anon ]
F6C00000 65536K rw--- [ anon ]
FAC00000 8K rw--- [ anon ]
FB000000 32768K rw--- [ anon ]
FD000000 8K rw--- [ anon ]
FD400000 16384K rw--- [ anon ]
FE400000 8K rw--- [ anon ]
FE800000 8192K rw--- [ anon ]
FF000000 8K rw--- [ anon ]
FF200000 1208K r-x-- /lib/libc.so.1
FF33E000 40K rwx-- /lib/libc.so.1
FF348000 8K rwx-- /lib/libc.so.1
FF360000 24K rwx-- [ anon ]
FF370000 8K rwx-- [ anon ]
FF380000 8K r-x-- /usr/lib/libmapmalloc.so.1
FF392000 8K rwx-- /usr/lib/libmapmalloc.so.1
FF3A0000 8K r-x-- /platform/sun4u-us3/lib/libc_psr.so.1
FF3B0000 208K r-x-- /lib/ld.so.1
FF3F4000 8K rwx-- /lib/ld.so.1
FF3F6000 8K rwx-- /lib/ld.so.1
FFBFE000 8K rw--- [ stack ]
total 1042000K