Allocating memory

Prasad (prasad_s@students.iiit.net)
Sat, 8 Mar 2003 20:24:25 +0530 (IST)


hi,
this sounds awkward, but how do we allocate mmap to a process, if
we want to explicitly do it? used the kmem_cache_alloc(mm_cachep,...) to
allocate memory to (task_struct)->mm, later allocated some vm_areas (no
dynamic libraries) similarly... after using pgd_alloc to allocate the
pgd, added mm to the mmlist and copied all other variables directly from
the original mm of that process... then, i tried to start the process...
the response was that the system rebooted instantaneously (i expected it
to generate some page-faults, but surprisingly nothing like that
happened...). On trying to learn about that further, thought i was missing
on the PMDs and the PTEs.

could someone enlighten me on what could have gone wrong in the above setup.

Thanks for your ideas.
Prasad.

-- 
Failure is not an option

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/