S
S S
Hi
I have my shared (.so) library which uses our own memory manager. 32
bit lib was working fine, but when we switched to 64 bit library, as
our own defined small pointer can not handle big addresses. I am
facing trouble as our memory manager do not handle big memory requests
but passes it on to system malloc() and malloc returns out of range
addresses which our small pointer can not accommodate. Whole of the
design is based on that small pointer and hence I can not avoid it.
Out of range addresses are returned due to the fact that malloc
internally uses mmap() call. I tried to disable it using mallopt() but
it is not getting disabled. I am using correct syntax, but I assume
there are some tricks to use it when using with shared library. So,
how to disable mmap() OR ask malloc to return addresses within range
in case of shared library ?
I would highly appreciate any suggestions.
S
I have my shared (.so) library which uses our own memory manager. 32
bit lib was working fine, but when we switched to 64 bit library, as
our own defined small pointer can not handle big addresses. I am
facing trouble as our memory manager do not handle big memory requests
but passes it on to system malloc() and malloc returns out of range
addresses which our small pointer can not accommodate. Whole of the
design is based on that small pointer and hence I can not avoid it.
Out of range addresses are returned due to the fact that malloc
internally uses mmap() call. I tried to disable it using mallopt() but
it is not getting disabled. I am using correct syntax, but I assume
there are some tricks to use it when using with shared library. So,
how to disable mmap() OR ask malloc to return addresses within range
in case of shared library ?
I would highly appreciate any suggestions.
S