ChaosLord's suggestion does have a point: depending on how exactly mem is allocated/freed, fragmentation might become a problem. If you allocate everything needed in advance, there's nothing to worry about. And you'd produce less overhead (for realtime requirements) - as long as you can live with the memory usage.
Also, I can't really imagine AllocMem() working inside an interrupt...