Installing and Managing HP-UX Virtual Partitions (A.02.01)

Calculating the Size of Kernels in Memory
Calculating the Size of a Kernel
Appendix C168
Calculating the Size of a Kernel
To calculate the size of the kernel, perform the following using the kernel
file (for example, /stand/vmunix) on the target OS:
Step 1. Get the ending address:
# nm /stand/vmunix | grep "ABS|_end"
[10828] | 212937784| 0|NOTYP|GLOB |0| ABS|_end
The ending address is the second number: 212937784
Step 2. Get the starting address
# nm /stand/vmunix | grep "__text_start$"
[111] | 201326592| 0|NOTYP|GLOB |0|$FIRST$|__text_start
The starting address is the second number: 201326592
Step 3. Subtract the starting address from the ending address and divide by
(1024 * 1024):
((212937784 - 201326592) / (1024 * 1024)) + 1 = 12.07
Step 4. Round up the result to the next multiple of 64 MB:
12.07 rounded to the next multiple of 64 MB = 64 MB
Use this number (64 MB) for the size of kernel. (Although the actual size
of the kernel may be closer to 12 MB, the minimum granularity with
which memory is assigned to a partition is 64 MB.)