Make unvis() have more reasonable argument types.
[unix-history] / usr / src / lib / libc / gen / valloc.c
CommitLineData
bb0cfa24
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
21fad3ef
KB
3 * All rights reserved.
4 *
269a7923 5 * %sccs.include.redist.c%
bb0cfa24
DF
6 */
7
2ce81398 8#if defined(LIBC_SCCS) && !defined(lint)
269a7923 9static char sccsid[] = "@(#)valloc.c 5.4 (Berkeley) %G%";
21fad3ef 10#endif /* LIBC_SCCS and not lint */
feea7534
BJ
11
12char *malloc();
13
14char *
15valloc(i)
16 int i;
17{
8b4f574e 18 int valsiz = getpagesize(), j;
455b164d 19 char *cp = malloc(i + (valsiz-1));
feea7534 20
8b4f574e 21 j = ((int)cp + (valsiz-1)) &~ (valsiz-1);
feea7534
BJ
22 return ((char *)j);
23}