static mem usage analysis