1. A method of managing data structures associated with code executable on a packet processor, comprising the steps of: identifying data structures in the code as being one of static data structures and non-static data structures, wherein a static data structure comprises a data structure that is not changed during execution of the packet processor code and a non-static data structure comprises a data structure that is changed during execution of the packet processor code; and managing one or more data structures associated with the packet processor code in a manner specific to the identification of the one or more data structures as static data structures or non-static data structures, wherein the manner in which the static data structures are managed differs from the manner in which the non-static data structures are managed; wherein at least a portion of the data structures comprise tree structures; wherein the managing step comprises updating the one or more tree structures associated with the packet processor code in a manner specific to the identification of the one or more tree structures as static tree structures or non-static tree structures, wherein the manner in which the static data structures are updated differs from the manner in which the non-static data structures are updated; and wherein the step of updating the one or more tree structures comprises updating the one or more tree structures in accordance with a multi-staged upgrade process; wherein the multi-staged upgrade process comprises a preparation stage, an update stage and a cleanup stage; wherein the preparation stage for a non-static tree structure comprises allocating an indirection address for a flow function referenced by the non-static tree; and wherein the indirection address for the flow function points to an address of the flow function in a current version of the packet processor code, and wherein the preparation stage for a non-static tree further comprises modifying one or more references to the flow function to point to the indirection address for the flow function.