This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: TDA2EVM5777
Tool/software: TI C/C++ Compiler
Hi All
I am working on overloading delete operator on A15 core which uses gcc-arm-none-eabi-4_7-2013q3 as the compiler.Below is the piece of code which i used
void operator delete(void *pfs)
{
printf("deleted address: %x \n", pfs);
free(pfs);
return;
}
void operator delete[](void *pfs)
{
operator delete(pfs);
}
void deletep(const char *file, int lineno)
{
const char *fname_delete;
fname_delete = print_file_name(file);
printf("Memory deleted @ file %s \t ", fname_delete);
printf("Line number %d \n ", lineno);
return;
}
#define new new(__FILE__, __LINE__)
#define delete deletep(__FILE__, __LINE__),delete
In the above code it compiles but when i execute this code the deletep function is not called. When i run the same piece of code on linux platform which uses gcc 4.6 it executes the function(deletep) and then delete operator is gets overloaded with user provided function. I would like to know what is causing this wired behavior?
Hi
Thanks for the reply. I am using gcc-arm-none-eabi-4_7-2013q3 compiler for A15. Can you please compile using the gcc version which i have mentioned and execute the program?
Hi,
I was lending a hand on this issue and try to reproduce this on this specific setup.
Please check the attached project at the end of this post. It contains all the required parameters to GCC and I was able to run your testcase on my AM572x EVM board.
Note the project runs on the external DDR, thus requiring your target configuration to use a board (I am using the configuration in the screenshot above).
Hope this helps,
Rafael