Re: [PATCH] Autoregulate vm swappiness cleanup

Valdis.Kletnieks
2003-10-28T17:33:58Z

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

On Tue, 28 Oct 2003 17:51:48 +0100, mru@kth.se (=?iso-8859-1?q?M=E5ns_Rullg=E5rd?=) said:

> Doing that mistake would give a linker error.

Not necessarily. Consider shared libraries. Load module1.so, load module2.so,
and then load module3.so that has an unresolved reference that both of the
other two happen to have. Oh wow.. results that are dependent on the order of
-l flags in a non-obvious way... And '-z muldefs' is always a good way to
shoot yourself in the foot.....

Yes, it's stupid, yes, it's a mistake - my point is that the design of C makes that
sort of mistake more likely. If there *did* exist a "private to all the pieces of the
module" status similar to the "private to THIS .c 'static'", it wouldn't be anywhere
near the problem.

And don't tell me that the Linux kernel hasn't seen similar issues - a supposedly
private interface that didn't have 'static' because it *was* called from 2 other
.c files in the directory. And then we have to tell people "don't call that interface,
it's private".

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]