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

Re: Unikraft unikernel - allocate memory page at predefined ritual address



Hi Mariusz,

you can use malloc() as if you would program for user space. It is provided by 
our internal libc (nolibc)  or even with our newlib or musl ports. It will get 
translated to uk_alloc() from the ukalloc library. This library does the 
low-level heap management.
For doing mmap() operations, you can select `ukmmap`. However, the its 
implementation is really limited at the moment. We have code in the works for 
doing page table modifications in order to do proper allocations with mmap().

Thanks,

Simon


On 24.09.20, 09:48, "Minios-devel on behalf of Mariusz Borsa" 
<minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of wrotki@xxxxxxxxxxx> 
wrote:

    Hi
    
    What would be the right way to do that, when I start from the helloworld 
example? Should I use mmap with MAP_FIXED option as I would do under Linux? Or 
is there a way to call something lower on the stack? 
    
    Or to reformulate the question - since the unikernel is well, a kernel - 
what would be the simplest way to have it allocate a virtual memory page at 
predetermined virtual address?
    
    Thanks
    Mariusz Borsa
    


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.