Skip to contentSkip to conversation

__get_free_pages but no get_free_pages?

DISCUSSION Pavel Machek 3 participants 3 messages Nov 16, 2001

lore
Share & tools
lore
#0 lore raw

Hi!

free_pages() exists.
__get_free_pages() exists.
get_free_pages() does not. Why? What's the reason get_free_pages always has two underscores at the beggining?
Pavel

Signature · 2 lines
STOP THE WAR! Someone killed innocent Americans. That does not give
U.S. right to kill people in Afganistan.
#1 lore raw
Quoted 7 lines · Pavel Machek

Hi!

free_pages() exists.
__get_free_pages() exists.
get_free_pages() does not. Why? What's the reason get_free_pages always has two underscores at the beggining?

That's purposedly so to discourage the usage of it, since this function should be considered as an "implementation detail" I think.

Quoted 3 lines

--
STOP THE WAR! Someone killed innocent Americans. That does not give U.S. right to kill people in Afganistan.

That where not just Americans who died there.
The best way to stop a war is sometimes just to win it fast.

#2 lore raw
Quoted 2 lines · [email protected] said:

That's purposedly so to discourage the usage of it, since this
function should be considered as an "implementation detail" I think.

An implementation detail that should be hidden from generic code. Like the fact that we use slabs for malloc?

--
dwmw2