mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 11:43:34 +08:00
Update.
2000-02-21 Ulrich Drepper <drepper@redhat.com> * malloc/Makefile (tests): Add tst-valloc. * malloc/tst-valloc.c: New file.
This commit is contained in:
parent
bfaf0bbb7d
commit
68e8dcc78f
@ -1,3 +1,8 @@
|
||||
2000-02-21 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* malloc/Makefile (tests): Add tst-valloc.
|
||||
* malloc/tst-valloc.c: New file.
|
||||
|
||||
2000-02-21 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* sysdeps/unix/sysv/linux/bits/in.h (IPV6_RXSRCRT): Renamed to
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -25,7 +25,7 @@ all:
|
||||
|
||||
dist-headers := malloc.h
|
||||
headers := $(dist-headers) obstack.h mcheck.h
|
||||
tests := mallocbug tst-malloc
|
||||
tests := mallocbug tst-malloc tst-valloc
|
||||
|
||||
distribute = thread-m.h mtrace.pl mcheck-init.c stackinfo.h memprof.h
|
||||
|
||||
|
21
malloc/tst-valloc.c
Normal file
21
malloc/tst-valloc.c
Normal file
@ -0,0 +1,21 @@
|
||||
/* Test case by Stephen Tweedie <sct@redhat.com>. */
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
char *p;
|
||||
int pagesize = getpagesize ();
|
||||
int i;
|
||||
|
||||
p = valloc (pagesize);
|
||||
i = (int) p;
|
||||
|
||||
if ((i & (pagesize-1)) != 0) {
|
||||
fprintf (stderr, "Alignment problem: valloc returns %p\n", p);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user