google / tcmalloc

Apache License 2.0
4.31k stars 463 forks source link

mmap failed, when offset is physical address #242

Closed zero-zhaowei closed 2 months ago

zero-zhaowei commented 2 months ago

used tcmalloc lib with hisi32bit platform, i need mmap an address and offset param is physical address(0x9240a000), but mmap failed.

static void* do_sys_mmap(long sysnr, void* start, size_t length, int prot, int flags, int fd, long offset), i think offset param type should be unsigned long .

signed type will lost Precision .

zero-zhaowei commented 2 months ago

i changed long offset to unsigned ,mmap succeed.

junyer commented 2 months ago

do_sys_mmap() does not exist in this ~dojo~ repo, does it? It does exist in https://github.com/gperftools/gperftools, which is where you will need to (re)file your issue.

zero-zhaowei commented 2 months ago

ok,thanks