Determination of the Worst-Case-Execution-Time of an allocation

As we have just seen, the worst-case-execution-time of an allocation depends on the amount of garbage-collection work that has to be performed for the allocation. The configuration of the heap as shown above gives a worst-case number of garbage collection work units that need to be performed for the allocation of one block of memory. To determine the actual time an allocation might take in the worst case, it is additionally required to know the number of blocks that will be allocated and the platform dependent worst-case execution time of one unit of garbage collection work.

For an allocation statement S we get the following equation to calculate the worst-case-execution time:

wcet(S) = numblocks(S) · max_gc_units · wcet_of_gc_unit

Where