Re: [Gc] Bus error && Deallocation of excessively large block ..
Ivan Maidanski
ivmai at mail.ru
Sat Jul 14 00:59:11 PDT 2012
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).*
More information about the Gc
mailing list