121366Sdist /* 221366Sdist * Copyright (c) 1980 Regents of the University of California. 335312Sbostic * All rights reserved. 435312Sbostic * 5*42628Sbostic * %sccs.include.redist.c% 621366Sdist */ 721366Sdist 826611Sdonn #if defined(LIBC_SCCS) && !defined(lint) 9*42628Sbostic static char sccsid[] = "@(#)valloc.c 5.4 (Berkeley) 06/01/90"; 1035312Sbostic #endif /* LIBC_SCCS and not lint */ 111996Swnj 121996Swnj char *malloc(); 131996Swnj 141996Swnj char * 151996Swnj valloc(i) 161996Swnj int i; 171996Swnj { 1813564Ssam int valsiz = getpagesize(), j; 1913582Ssam char *cp = malloc(i + (valsiz-1)); 201996Swnj 2113564Ssam j = ((int)cp + (valsiz-1)) &~ (valsiz-1); 221996Swnj return ((char *)j); 231996Swnj } 24