1*21366Sdist /* 2*21366Sdist * Copyright (c) 1980 Regents of the University of California. 3*21366Sdist * All rights reserved. The Berkeley software License Agreement 4*21366Sdist * specifies the terms and conditions for redistribution. 5*21366Sdist */ 6*21366Sdist 713582Ssam #ifndef lint 8*21366Sdist static char sccsid[] = "@(#)valloc.c 5.1 (Berkeley) 05/30/85"; 9*21366Sdist #endif not lint 101996Swnj 111996Swnj char *malloc(); 121996Swnj 131996Swnj char * 141996Swnj valloc(i) 151996Swnj int i; 161996Swnj { 1713564Ssam int valsiz = getpagesize(), j; 1813582Ssam char *cp = malloc(i + (valsiz-1)); 191996Swnj 2013564Ssam j = ((int)cp + (valsiz-1)) &~ (valsiz-1); 211996Swnj return ((char *)j); 221996Swnj } 23