Forum Discussion
We are facing a peculiar issue – we have a code that dynamically allocates memory (bigger size as per need) and copies data from an old memory location into it. Later we free up that old memory location. We are observing memory fault error when we either copy data or free the old dynamically allocated memory. We observed that issue occurs when memory is allocated at a HEAP higher address – as per our issue 0x7874eee0.
I am not sure whether it is a linker script issue or not cause malloc for new memory returns success - perhaps that memory regoion overlaps BSS or STATIC or some other memory and hence the issue. But then why malloc is returned as success - where and how do we specify HEAP bounday and make malloc to fail in such a case.
Hi PrakashPrasad,
It seems that you met a different issue with the original one, could you upload the error message in your case?
Best Regards