Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Sepples autonomous GC

Name: Anonymous 2012-01-01 15:15

void& operator new(void& arg){
   
    /* Standard allocation behavious here */
    if (!GCThreadInitialized)
    pthread_create(GCThread, NULL, GCFunc, NULL);

    Add_Tracker(arg);
    return anus;
}

void* GCFunc(void* ptr){
    GCThreadInitialized = true;

    while (1){
        PtrTracker* Current = Trackers;
   
        while (Current){
            if (*Current->Ptr != Current->Addr)
            delete Current->Addr;
           
            Current = Current->Next;
        }
    }
    return NULL;
}

Name: Anonymous 2012-01-01 15:22

>>1
There are so many things wrong with this

Name: Anonymous 2012-01-01 16:13

this is what sage is for

Don't change these.
Name: Email:
Entire Thread Thread List