[Gc] strange problem: GC needs manually calling to GC_gcollect()?

mental at rydia.net mental at rydia.net
Wed Jul 13 14:32:31 PDT 2005

Quoting Zhang Le <69dbb24b2db3daad932c457cccfd6 at gmail.com>:

> Sounds very complex. My current solution is to keep to  original
> address being pointed using another pointer:
>   double* p_data = GC_MALLOC(sizeof(double)*100);
>  double* p = p_data + 50;
>  // access p[-10] p[-20], p[30] etc.
> I think it will work at least for this example.

Compilers are likely to optimize that extra pointer away.


More information about the Gc mailing list