1. A method comprising: receiving program code with annotations in the program code that each include an operation to specify a reservation or release of a resource from a pool of resources, wherein the annotations to the program code represent at least one static check and at least one dynamic check, and at least one of the annotations includes an operation to reserve at least one resource for use by a portion of the program code; and statically verifying information about one or more dynamic checks in the program code, each of the one or more dynamic checks in the program code to check an annotation operation in the program code and to compare the annotation operation to a security policy for resource allocation, wherein statically verifying information about one or more dynamic checks in the pro gram code comprises statically checking one or more operations in the program code for reserving one or more resources to determine whether the one or more resources being reserved by the one or more operations are enough to account for all runtime operations that consume resources in the program code to satisfy the security policy, wherein the security policy specifies resources that the program code can use and the corresponding usage bounds.