diff --git a/src/lladd/page.c b/src/lladd/page.c index c089a12..3ded7a5 100644 --- a/src/lladd/page.c +++ b/src/lladd/page.c @@ -147,7 +147,9 @@ void pageInit() { for(int i = 0; i < MAX_BUFFER_SIZE+1; i++) { pool[i].rwlatch = initlock(); pool[i].loadlatch = initlock(); - assert(!posix_memalign((void*)(&(pool[i].memAddr)), PAGE_SIZE, PAGE_SIZE)); + int ret = posix_memalign((void*)(&(pool[i].memAddr)), PAGE_SIZE, PAGE_SIZE); + + assert(!ret); } pthread_mutex_init(&lastAllocedPage_mutex , NULL); diff --git a/src/lladd/pageFile.c b/src/lladd/pageFile.c index 086cd7f..01c93c8 100644 --- a/src/lladd/pageFile.c +++ b/src/lladd/pageFile.c @@ -116,12 +116,12 @@ void pageWrite(Page * ret) { } pthread_mutex_unlock(&stable_mutex); } - +/** @todo O_DIRECT is broken on old (pre 2.6.2ish?) linux, so it's disabled until the build script can be improved. :( */ void openPageFile() { DEBUG("Opening storefile.\n"); - stable = open (STORE_FILE, O_CREAT | O_RDWR | O_DIRECT, S_IRWXU | S_IRWXG | S_IRWXO); + stable = open (STORE_FILE, O_CREAT | O_RDWR /*| O_DIRECT*/, S_IRWXU | S_IRWXG | S_IRWXO); if(stable == -1) { perror("couldn't open storefile");