page count for just allocated pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I'm trying to understand page's usage counter. A just allocated page shouldn't have its page count zeroed?
I tryied the code below and the result surprised me:


        page = page_cache_alloc_cold(vmapping);
        if (!page) {
                return NULL;
        }

        printk("Page count after alloc: %i\n", page_count(page));

	Result:
	Page count after alloc: 1

	Where is the page count incremented?

	Running kernel 2.6.8-rc3.

	TIA,
		Luciano

--
Luciano A. Stertz
luciano@xxxxxxxxxxxx
T&T Engenheiros Associados Ltda
http://www.tteng.com.br
Fone/Fax (51) 3224 8425

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux