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

Time to Test Your Compiler

Name: Anonymous 2014-04-30 9:59

void foo() {}
void bar() {}
void main() {
if ((void*)foo < (void*)bar) {
printf("sound compiler! preserves ordering.\n");
} else {
printf("your gaypiler sucks balls and doesn't respect memory layout\n");
}
}

Name: Anonymous 2014-05-06 15:52

>>28
An array element at a lower index is guaranteed to have an address that is lower than an array element at a higher index. So if you allocate all the pools from the same array, total ordering is guaranteed.

>>30
I don't know what you are trying to say here, and I suspect you don't either. You are aware that page boundaries and cache line boundaries are different, right? Most compilers will try to put things on a cache line boundary if asked; in practice however this can hurt more than help because the padding required to ensure alignment reduces the total cache utilization.

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