I wanted to make contiguous view of several physmem regions using
malloc to alloc virtual region of total length and then map physical
regions ontop of virtual one.
You really lost me here. What do you want to achieve exactly?
The libc malloc() uses virtual memory areas backed by anonymous physical
memory as its backend. But the mapping of these virtual memory areas is
not guaranteed to be continuous in physical memory.
If you allocate some memory using malloc(), why do you want to overlay
some other physical memory on top of it then? Why not simply map that
physical memory using physmem_map() or dmamem_map() in the first place,
without wasting some additional memory using malloc()?
If I can guess that your motivation is to have something like a custom
memory allocator atop a physmem_map()-ed or dmamem_map()-ed virtual
memory area, then you should really implement such a custom allocator
from scratch.
M.D.
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel