Explorar o código

minor cache optim

Nicolas Cannasse %!s(int64=2) %!d(string=hai) anos
pai
achega
70cfb79113
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/allocator.c

+ 1 - 0
src/allocator.c

@@ -157,6 +157,7 @@ static gc_pheader *gc_allocator_new_page( int pid, int block, int size, int kind
 		else {
 			p->sizes = ph->base + start_pos;
 			start_pos += p->max_blocks;
+			start_pos += (-start_pos) & 63; // align on cache line
 		}
 		MZERO(p->sizes,p->max_blocks);
 	}