. service tells you which device it couldn't stat
[minix3.git] / drivers / memory / allocmem.c
blob31599da7380f4a5b54e21223abe5ac8da93e20b8
1 #include <lib.h>
2 #include <unistd.h>
4 PUBLIC int allocmem(size, base)
5 phys_bytes size; /* size of mem chunk requested */
6 phys_bytes *base; /* return base address */
8 message m;
9 m.m4_l1 = size;
10 if (_syscall(MM, ALLOCMEM, &m) < 0) return(-1);
11 *base = m.m4_l2;
12 return(0);