source:
trunk/minix/lib/other/_allocmem.c@
20
| Last change on this file since 20 was 9, checked in by , 15 years ago | |
|---|---|
| File size: 317 bytes | |
| Rev | Line | |
|---|---|---|
| [9] | 1 | #include <lib.h> |
| 2 | #define allocmem _allocmem | |
| 3 | #include <unistd.h> | |
| 4 | ||
| 5 | ||
| 6 | PUBLIC int allocmem(size, base) | |
| 7 | phys_bytes size; /* size of mem chunk requested */ | |
| 8 | phys_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.