I think I got part of the answer. The allocation algorithm is in stdlib...
To test various "immunity aware"schemes, I gues I could emulate occasional random jumps to the part of the function that is below the ip_flow_var definition and do the statistics...
Peter