Basically, the answer closest to the truth is number, 2, the database memory be the sum of all the assigned values for these memory contributors. For example, the database memory does not override the bufferpool sizes you have set up.
If the database memory specified is less than the amount calculated from the individual parameters (for example, locklist, utility heap, bufferpools, etc), the larger amount will be used.
However, in V9, the capability does exist to let DB2 choose all the memory allocations dyanamically (including bufferpools).