Memory allocation and accessing in ClientAgent