Skip to contentSkip to conversation

linux-libc-headers 2.6.8.1

ANNOUNCE Albert Cahalan 1 participant 1 message Aug 30, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Erik Andersen
Quoted 4 lines · Mariusz Mazur

Nothing special, really. One bigger change - on archs that have >1 possible page sizes (PAGE_SIZE definition in asm/page.h) we're now using a call to libc's getpagesize(), so don't count on it being static on archs like ia64.

Quoted 5 lines

I really do not like this change. Since PAGE_SIZE has always been a constant, the change you have made is likely to break a fair amount of code, basically any code doing stuff like:

static int* foo[PAGE_SIZE];

SuSE has already done this, so it's nothing new.

Quoted 4 lines

Your change will result in cryptic errors such as

"error: variable-size type declared outside of any function" "error: storage size of `foo' isn't constant"

You'll get a line number too. At least it's a compile-time error, instead of a quiet data-corrupting run-time error.

Quoted 4 lines

depending on whether the declaration is outside a function or in one. I think it would be much better to either

a) remove PAGE_SIZE or make using it an error somehow,

Nope. That breaks more code than necessary.

Quoted 1 line

b) make PAGE_SIZE an install time config option

Nope. Executables need to run on multiple kernels.

Quoted 3 lines

c) declare that on architectures such as mips that support variable PAGE_SIZE values, the libc kernel headers shall always provide the largest fixed size value of PAGE_SIZE

Nope. This is silent data corruption.

You'll break stuff like this: P_rss *= (PAGE_SIZE/1024);