~bkerensa/ubuntu/raring/valgrind/merge-from-deb

« back to all changes in this revision

Viewing changes to memcheck/tests/stack_switch.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-06-26 00:17:17 UTC
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20060626001717-qi51nzty57cb12q6
Tags: upstream-3.2.0
Import upstream version 3.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
   memset( buffer, 1, sizeof( buffer ) );
26
26
 
 
27
   sleep(2); /* ppc64-linux hack */
27
28
   return memchr( buffer, 1, sizeof( buffer ) ) == NULL;
28
29
}
29
30
 
33
34
   int stackid;
34
35
   pid_t pid;
35
36
 
36
 
   if ( ( stack = mmap( NULL, STACK_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 ) ) == MAP_FAILED )
 
37
   /* "2*" is a ppc64-linux hack */
 
38
   if ( ( stack = mmap( NULL, 2* STACK_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 ) ) == MAP_FAILED )
37
39
   {
38
40
      perror( "mmap" );
39
41
      exit( 1 );