Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!harpo!floyd!vax135!cornell!uw-beaver!ubc-visi!alberta!stephen From: stephen@alberta Newsgroups: net.unix-wizards Subject: Shared system routines Message-ID: <392@alberta.UUCP> Date: Sat, 23-Jul-83 03:20:58 EDT Article-I.D.: alberta.392 Posted: Sat Jul 23 03:20:58 1983 Date-Received: Sat, 23-Jul-83 19:11:28 EDT Lines: 34 .nh .ad l It has bothered me for a while that every time I compile a C program, of the routines which I use are physically added to the object file. When you consider that many of the routines are included in almost every object file, perhaps it would be better to share one copy of the more common routines between all tasks. The most obvious advantage of this approach would be the savings in disk space. As an example: On our system, with about 1200 object files, the savings from sharing the startup routines and PRINTF (apx 7k per file) would come to about 9meg. Sharing routines would also result in decreased memory usage and possibly faster loading times (since only the user routines would have to be loaded). Those subroutines used by the kernel would have to be designated as shared non-paged, and others could be simply shared. The big question is how easy would it be to make the change? Memory management would have to be modified, the loader, and possibly things like 'adb' as well. And where would the routines be placed? If they are put at the bottom of memory, would this cause problems with routines that didn't expect them there? And if they are placed at the top of memory, would that cause problems with ADB and CDB or get in the way of the stack? I don't yet know enough about UN*X to really answer those questions well. Does it sound like a feasible Idea or am I out in left field? Stephen Samuel (ubc-visi!alberta!stephen)