This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Help ! Memory allocating problems
- From: Virender Kashyap <virenk at cse dot iitb dot ac dot in>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 12 Jun 2005 01:11:03 +0530 (IST)
- Subject: Help ! Memory allocating problems
Hi,
I am working on a small implementation in gcc-code. I declare some
data structures, using GTY(()) tag ..and allocate elements using
ggc_alloc_cleared function.
To free data, i use ggc_free function.
The problem is that many a times i get strange memory allocation
segfaults in xcalloc/xmalloc. In case i don't free any allocated memory,
things work fine most of the times.
What could be the problem above. Also what is the correct method
of allocating and dealloction of data/arrays in gcc ?
Please help as i am already bugged by these errors :(, and this
is urgent for my project.
Thanks and Regards,
Virender