Browse Prior Art Database

Transparent Dynamic Subroutine Loader

IP.com Disclosure Number: IPCOM000060866D
Original Publication Date: 1986-May-01
Included in the Prior Art Database: 2005-Mar-09
Document File: 2 page(s) / 49K

Publishing Venue

IBM

Related People

Bull, M: AUTHOR

Abstract

A method is described which allows program subroutines to be dynamically loaded the first time they are called by anyone. The fact that the routine needs to be loaded is totally transparent to the calling program. Typically, programs are created as gigantic load modules. This requires a large amount of storage overhead, prior to ever loading any data. In large host processors, this usually was not a problem, except for instances of extremely large data volumes. However, with limited main memory sizes in workstations this can become very critical. This method allows the subroutines to be maintained as separate load modules and not be loaded until, and if, required. To support the dynamic loading function, the main program creates two tables. One contains the names of all of the subroutines.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

Transparent Dynamic Subroutine Loader

A method is described which allows program subroutines to be dynamically loaded the first time they are called by anyone. The fact that the routine needs to be loaded is totally transparent to the calling program. Typically, programs are created as gigantic load modules. This requires a large amount of storage overhead, prior to ever loading any data. In large host processors, this usually was not a problem, except for instances of extremely large data volumes. However, with limited main memory sizes in workstations this can become very critical. This method allows the subroutines to be maintained as separate load modules and not be loaded until, and if, required. To support the dynamic loading function, the main program creates two tables. One contains the names of all of the subroutines. The other contains a companion list of pointers to the routines. Each pointer is initialized to a unique entry point into the special dynamic loader program (described below) corresponding to the associated subroutine. Any routine which calls a subroutine uses the pointer table to get the address of that subroutine. The first time the subroutine is called, control is actually passed to the special entry point in the dynamic loader. All subsequent calls pass control directly to the actual subroutine. The heart of the method is the dynamic loader routine. It must be linked with the main program. Prior to any other subroutine calls, it must be called and the two tables must be passed to it. This allows it to establish addressability to the tables. Whenever one of the unique entry points is called, an index is set corresponding to the location of the subroutine in the tables. Then control is passed to the common part of the loader. It uses the index to access the name of the subroutine, load it, replace the pointer in the table with the actual address, flag that the subroutine has been loaded, and pass control on to the subr...