Code Size Reduction by Outlining Specific Functions in a Library
A method of reducing the size of a set of computer code intended for use in a computing device, the set of code being intended for loading into memory automatically when the computing device is powered up, and comprising functions for performing computing tasks, the method comprising: specifying a particular use of the computing device; identifying those functions in the set of computer code that will be required in order to implement the said use of the computing device; and removing the identified functions from the set of code and placing them in a separate computer code library.
1 . A method of reducing the size of a set of computer code intended for use in a computing device, the set of code being intended for loading into memory automatically when the computing device is powered up, and comprising functions for performing computing tasks, the method comprising:
specifying a particular use of the computing device;
identifying those functions in the set of computer code that will be required in order to implement the said use of the computing device; and
removing the identified functions from the set of code and placing them in a separate computer code library.
2 . A method according to claim 1 wherein the step of removing the identified functions comprises replacing the identified functions with code arranged to call the separate computer code library, whereby the combined functionality of the reduced set of computer code and the separate computer code library is equivalent to the functionality of the original set of code.
3 . A method according to claim 1 wherein the step of identifying the required functions comprises:
executing the original set of computer code to perform the said use on a test computing device; and
determining which functions in the set of computer code are used during the execution.
4 . A method according to claim 3 wherein the step of determining which functions in the set of computer code are used during the execution involves the use of function profiling or callgraph analysis techniques.
5 . A method according to claim 1 wherein the said use of the computing device represents an application expected to be used infrequently in the computing device.
6 . A method according to claim 1 wherein the said use of the computing device represents an application that is not essential to the operation of the device.
7 . A method according to claim 1 wherein the separate computer code library is a dynamic link library.
8 . A method according to claim 1 wherein the step of placing the identified functions in a separate computer code library results in a library in which functions are clustered according to a corresponding use of an associated computing device.
9 . A method according to claim 1 wherein the set of computer code is executable code.
10 . A reduced set of computer code obtained from the method of claim 1 .
11 . An operating system comprising the reduced set of computer code obtained from the method of any of claim 1 .
12 . An operating system according to claim 11 further comprising the separate computer code library of claim 1 .
13 . A computing device comprising the reduced set of computer code obtained from the method of claim 1 .
14 . A computing device according to claim 13 further comprising the separate computer code library of claim 1 .
15 . A computing device according to claim 14 wherein the reduced set of computer code and the separate computer code library are parts of an operating system of the computing device.
16 . A computing device according to claim 14 wherein the separate computer code library is loadable into memory of the device separately from the reduced set of computer code.
17 . A method for creating a library of computer code intended for use on a computing device, the method comprising:
specifying a particular use of the computing device;
identifying a set of functions for performing computing tasks, the set of functions being required to implement the said use of the computing device; and
placing the set of functions in a library, such that the functions in the library are grouped according to a use of the computing device, and not according to the computing tasks performed by the individual members of the set.
18 . A dynamic link library comprising a set of functions for performing computer tasks, wherein each function in the set is required for an associated computing device to implement a particular use.