Dear All,

I am doing some R&D related to libc.so.1 and ld.so.1.
I found that there are _atexit () function call in libc_init() function of file 
port/threads/thr.c as following:
void
libc_init(void){
------
         /*
         * Every libc, regardless of which link map, must register __cleanup().
         */
        (void) _atexit(__cleanup);
-----
}

Now I see that whenevr libc_init() is called for Alternative link map(ld.so.1 
link map) ,libc.so.1 lmalloc() is not called from _atexit() but ld.so.1 
lmalloc() is getting called. why this is happening I think it should call 
libc.so.1 lmalloc().

Now another  question is if lmalloc() of ld.so.1 is getting called in above 
case then to release the corresponding memory it must called ld.so.1 lfree() 
but I found that libc.so.1 lfree() is getting called rather than ld.so.1 
lfree(), why?.

regards
Bhushan
 
 
This message posted from opensolaris.org

Reply via email to