2008-11-19 13:26:10 +01:00
|
|
|
|
|
|
|
#include "syslib.h"
|
|
|
|
|
|
|
|
#include <minix/vm.h>
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* vm_allocmem *
|
|
|
|
*===========================================================================*/
|
2008-11-19 16:40:17 +01:00
|
|
|
PUBLIC int vm_allocmem(phys_clicks bytes, phys_clicks *retmembase)
|
2008-11-19 13:26:10 +01:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
int result;
|
|
|
|
|
2009-10-05 18:40:21 +02:00
|
|
|
m.VMAM_BYTES = (char *) bytes;
|
2008-11-19 13:26:10 +01:00
|
|
|
result = _taskcall(VM_PROC_NR, VM_ALLOCMEM, &m);
|
|
|
|
if(result == OK)
|
|
|
|
*retmembase = m.VMAM_MEMBASE;
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|