minix/lib/syslib/sys_kmalloc.c
2005-04-21 14:53:53 +00:00

19 lines
573 B
C

#include "syslib.h"
/*===========================================================================*
* sys_kmalloc *
*===========================================================================*/
PUBLIC int sys_kmalloc(size, phys_base)
size_t size; /* size in bytes */
phys_bytes *phys_base; /* return physical base address */
{
message m;
int result;
m.MEM_CHUNK_SIZE = size;
if (OK == (result = _taskcall(SYSTASK, SYS_KMALLOC, &m)))
*phys_base = (phys_bytes) m.MEM_CHUNK_BASE;
return(result);
}