MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / getFrom

Method getFrom

src/hx/gc/Immix.cpp:2966–3000  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2964 }
2965
2966 BlockDataInfo *getFrom()
2967 {
2968 while(true)
2969 {
2970 if (from>=to)
2971 {
2972 //printf("Caught up!\n");
2973 return 0;
2974 }
2975 #ifndef HXCPP_GC_DEBUG_ALWAYS_MOVE
2976 // Pinned / full
2977 if (blocks[from]->mMoveScore<2)
2978 {
2979 //printf("All other blocks good!\n");
2980 while(from<to)
2981 {
2982 //printf("Ignore DEFRAG %p ... %p\n", blocks[from]->mPtr, blocks[from]->mPtr+1);
2983 from++;
2984 }
2985 return 0;
2986 }
2987 #endif
2988 if (blocks[from]->mPinned)
2989 {
2990 //printf("PINNED DEFRAG %p ... %p\n", blocks[from]->mPtr, blocks[from]->mPtr+1);
2991 from++;
2992 }
2993 else // Found one...
2994 break;
2995 }
2996 //printf("From block %d (id=%d)\n", from, blocks[from]->mId);
2997 BlockDataInfo *result = blocks[from++];
2998 ////printf("FROM DEFRAG %p ... %p\n", result->mPtr, result->mPtr + 1 );
2999 return result;
3000 }
3001 BlockDataInfo *getTo()
3002 {
3003 if (from>=to)

Callers 1

MoveBlocksMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected