[aspectc-user] capturing memory allocations
    Tiago Rodrigues 
    omicronix at gmail.com
       
    Tue Mar 22 00:08:24 CET 2005
    
    
  
Hi, i'm new to aspectc,
i'm trying to capture heap memory allocations to do a sort of memory profiller.
My problem is that my advices don't get applied to the code.
Here is an example:
aspect:
[CODE]
aspect MemProf
{
        advice call("% operator new(...)") || call("% %::operator
new(...)") : before()
	{
              std::cout << "call to new()" << std::endl;
        }
};
[/CODE]
sample code:
[CODE]
int main()
{
        class Test {};
	Test *t  = new Test;
        int *i = new int[10];
        delete[] i;
	delete t;
	return 0;
}
[/CODE]
the advice isn't being applied to the new calls.
anyone can help?
using: ac-0.9.2, on linux
gcc version: 3.4.3
thanks in advance,
Tiago R.
    
    
More information about the aspectc-user
mailing list