[Gc] Bus error && Deallocation of excessively large block ..
Arote Uddhav
aroteuddhav at gmail.com
Sat Jul 14 01:16:02 PDT 2012
No luck.. !
On Sat, Jul 14, 2012 at 1:29 PM, Ivan Maidanski <ivmai at mail.ru> wrote:
> Hi Arote,
>
> Please ensure that you have in the code:
>
> #define GC_THREADS
> #include <gc.h>
>
> ...
>
> main() {
> GC_INIT();
>
> Regards,
> Ivan
>
> Wed, 11 Jul 2012 15:11:12 +0530 Arote Uddhav <aroteuddhav at gmail.com>:
> > Hi All ,
> > I am trying gc with my program. I need to create threads at run time.
> >
> >
> > <code>
> > while(1)
> > {
> > pthread *t = (pthread_t *) GC_MALLOC( num_of_files * sizeof (pthread_t
> ));
> > int *iret = (int *) GC_MALLOC( num_of_files * sizeof (int ));
> >
> > .........
> >
> > while( ( dirp = readdir( d )) != NULL )
> > {
> > if ( ( stat( dirp->d_name , &stat_buf) != -1 ) && (S_ISREG(
> > stat_buf.st_mode ) ))
> > {
> > iret [ fileCounter ] = pthread_create ( &t [ fileCounter ] , NULL ,
> > callPluginHandle , (void *)(dirp->d_name) ) ;
> > fileCounter ++;
> > }
> > }
> > ...........
> > }
> > </code>
> >
> > This is a code prototype which I am trying to write. But I get run
> time
> > problmes
> > ----- Bus error
> > ----- Deallocation exclusively large block
> > ----- Collecting unknown thread
> >
> > I am not doing any free or deallocation .. I am relying on gc for all
> > memory freeing !
> > Help required ! :)
> >
> > --
> > *Uddhav Arote*
> >
> > Mob Number : +91 9767168079
> > *Vidyavardhini College Of Engg. and Tech,Mumbai(MAHARASHTRA).*
>
--
*Uddhav Arote*
Mob Number : +91 9767168079
*Vidyavardhini College Of Engg. and Tech,Mumbai(MAHARASHTRA).*
Life is no brief candle for me. It is a sort of splendid torch which I have
got hold of for the moment, and I want to make it burn as brightly as
possible before handing it on to future generations.
-George Bernard Shaw
* <Email-id%3Aaroteuddhav at gmail.com>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20120714/5932b461/attachment.htm
More information about the Gc
mailing list