Re: Page allocation and de-allocation

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

 




Can we see what happens when it "crashes" please? Why did you feel the
need to allocate memory in this fashion? Was it not possible simply to
allocate a large virtually contiguous space with vmalloc or use mem
caches for general objects? What was missing the standard Linux VM
which meant you had to do it this way?

Jon.

Hi, Jon:

I solved the problem by replacing the page de-allocation function __free_page(pg_array[i])
with the function
free_page((unsigned long)pg_array[i]).

My module is working fine now. The problem was due to __free_page() only take page physical addr as the parameter, but pg_array only holds vertual addr.

The reason I don't use very large contigeous vmalloc-ed virtual mem is because I might need to use more that 128MB mem. So, I use vmalloc-ed array to hold needed pages.

Fei





[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