source: trunk/minix/lib/other/_allocmem.c@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 317 bytes
Line 
1#include <lib.h>
2#define allocmem _allocmem
3#include <unistd.h>
4
5
6PUBLIC int allocmem(size, base)
7phys_bytes size; /* size of mem chunk requested */
8phys_bytes *base; /* return base address */
9{
10 message m;
11 m.m4_l1 = size;
12 if (_syscall(MM, ALLOCMEM, &m) < 0) return(-1);
13 *base = m.m4_l2;
14 return(0);
15}
16
Note: See TracBrowser for help on using the repository browser.