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-05 14:37

>>21

Can you give a concrete example of a problem in which 1) you need to encode information by ordering, 2) you cannot rely on an optimizer to do so, and 3) there is not another (relatively simple) method of encoding this information?
Let's say we have a number of memory pools, used to do BIBOP allocation. Each pool has corresponding handler, which hardcodes stuff like memcpy and memcmp for its corresponding pool size. We want these pool handlers to be ordered in memory according their pool sizes, so that determining if object can be copied from one pool to the other would require just handler pointer comparison, instead of calling their length functions and comparing results.

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