gaf@uucs1.UUCP (gaf) (02/07/91)
This may well have been around before, but it's not in the FAQ list... Is there any particular reason why Interactive doesn't have shared versions of the X libraries? We've been trying to roll our own from the MIT source, but keep bumping into one problem after another (maybe ISC has, too!). Programs link okay, but give various mysterious errors at run time (e.g. inheritance problems, sometime just core dumps). The reason this is cross-posted to comp.windows.x is to ask if there's anything inherent in the Xlib or Xt code which would preclude them from easily being made into shared libraries? When you're running several copies of a program which is over 1 Mb in memory, you start wishing for the promised land of shared libraries. -- Guy Finney It's that feeling of deja-vu UUCS inc. Phoenix, Az all over again. ncar!noao!asuvax!hrc!uucs1!gaf sun!sunburn!gtx!uucs1!gaf
cpcahil@virtech.uucp (Conor P. Cahill) (02/08/91)
In article <401@uucs1.UUCP> gaf@uucs1.UUCP () writes: >When you're running several copies of a program which is over 1 Mb in memory, >you start wishing for the promised land of shared libraries. If it's several copies of the same program, shared libraries won't save you anything because the programs shar text anyway (i.e. if you have 10 vi's running and vi has a size of 125k text, 136k data the total memory resources will be approximately 125k + 10*136k. This is the same even if vi is compiled with shared libraries). The place where shared libraries save you is when you have multiple programs that use the same libraries, since different programs do not share text (unless, of course, you set up the programs as links to each other and used argv[0] to differentiate between the two - like mv/cp/ln). -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc. uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170
roell@informatik.tu-muenchen.de (Thomas Roell) (02/12/91)
>Is there any particular reason why Interactive doesn't have shared versions >of the X libraries? We've been trying to roll our own from the MIT source, >but keep bumping into one problem after another (maybe ISC has, too!). >Programs link okay, but give various mysterious errors at run time >(e.g. inheritance problems, sometime just core dumps) Yes, there is for a commercial vendor a BIG reason why not to use shared libs: They are very incompatible. If you change only a little bit in the sources, there might be big changes in the shared lib. You can avoid this using the branch-tab for functions, but data-items that are exported are *very* problematik. Also without SPECIAL programs that aid developing of a shared lib, I think it's impossible to make a good (compatible, working ...) one. But these tools are not part of SVR3. It took me about 2 months to develope such a beast. >The reason this is cross-posted to comp.windows.x is to ask if there's >anything inherent in the Xlib or Xt code which would preclude them from >easily being made into shared libraries? Xlib: trivial Xt: needs some changes to avoi exported data in the shared lib. >When you're running several copies of a program which is over 1 Mb in memory, >you start wishing for the promised land of shared libraries. That's true. I use often the XView 2.0 toolkit. The target shared lib of this toolkit is over 600k big. A client linked without shared lib is over 1MB. But keep in mind that only the text-section is shared; ever process has the data-section private. Therfore some X-clients use MORE physical memory when using shared libs. But on the other hand are the clients much faster, cause the all use the SAME shared libs, and the chances that these executable sections are in core are much higher (thus reducing paging). BTW, there is a sample implementation of shared X-Windows libs freely available. Its part of a package called X386. - Thomas -- _______________________________________________________________________________ E-Mail (domain): roell@lan.informatik.tu-muenchen.de UUCP (if above fails): roell@tumult.{uucp | informatik.tu-muenchen.de} famous last words: "diskspace - the final frontier..."