From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,eec65889e185680,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1995-01-20 17:08:36 PST Newsgroups: comp.sys.dec Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!fnnews.fnal.gov!uwm.edu!spool.mu.edu!howland.reston.ans.net!ix.netcom.com!netcom.com!scotty From: scotty@netcom.com (J Scott Peter) Subject: Re: Answers to post: Malloc Problem, shared libs Message-ID: Organization: NETCOM On-line Communication Services (408 261-4700 guest) X-Newsreader: TIN [version 1.2 PL1] References: <1995Jan18.134122.14607@decvax.dec.com> Date: Sat, 21 Jan 1995 01:08:36 GMT David Srebnick DEG (srebnick@zk3.dec.com) says: > >Article: 10355 > >Newsgroups: comp.sys.dec > >From: scotty@netcom.com (J Scott Peter) > >Subject: Malloc problem, shared libs > >Organization: NETCOM On-line Communication Services (408 261-4700 guest) > >Date: Tue, 10 Jan 1995 03:55:07 GMT > > > >2 questions: First, is anyone aware of a problem on a DEC Alpha OSF/1 whereby > >certain programs under certain recursive conditions start to eat up virtual > >memory far beyond what they are actually using on the stack or heap, > >eventually using up all the swap space? > Early releases of Alpha OSF/1 malloc() used a binary buddy allocation > scheme. This algorithm, although very fast, has a high level of > overhead. For small applications, the overhead is typically about 40%. > The overhead is not visible or tracked, but, does require swap space. > The current malloc() algorithm is much more efficient. Since you did > not specify what release cause the problem, i assume this is the > correct answer. Thanks for your help. We have OSF/1 V2.0. Sorry I didn't mention it. > >other libraries (libX11, libXm, etc) as shared. How do you individually > >specify libraries as shared/non-shared on the command line? The -non_shared > >and -call_shared flags are not positional. They affect all the libraries on > >the command line. > ld .... foo.o libc.a ..... -lanotherlibs > The linker will search the .a to resolve externals and the resolution will > be with non_shared objects. then the .so objects will be used to continue > the search. Still not having any luck with the above. If I add /usr/lib/libc.a into the library list, whether it's before or after the -lotherlibs, and whether I use `cc' or `ld -call_shared' to link, I get the following when the program runs: 22533:test: /sbin/loader: Warning: Can't find strong symbol for dlopen 22533:test: /sbin/loader: Warning: Can't find strong symbol for dlsym These messages repeat several times, then the program `test' seg faults. Traceback indicates it died calling malloc. -- J Scott Peter XXXIII // Wrong thinking is punishable. scotty@netcom.com // Right thinking is as quickly rewarded. Los Angeles // You will find it an effective combination.