[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-cvs
Subject:    [Ltp-cvs] ltp/testcases/kernel/mem/hugetlb/hugemmap hugemmap02.c,1.3,1.4
From:       Robert Williamson <robbiew () users ! sourceforge ! net>
Date:       2004-04-27 14:32:31
Message-ID: E1BITdP-0003Gn-Dn () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/ltp/ltp/testcases/kernel/mem/hugetlb/hugemmap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12540

Modified Files:
	hugemmap02.c 
Log Message:
Corrected bug in test.


Index: hugemmap02.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** hugemmap02.c	20 Apr 2004 21:46:01 -0000	1.3
--- hugemmap02.c	27 Apr 2004 14:32:28 -0000	1.4
***************
*** 66,70 ****
--- 66,72 ----
  #define PAGE_SIZE      ((1UL) << 12) 	/* Normal page size */
  #define HPAGE_SIZE     ((1UL) << 24) 	/* Huge page size */
+ #define MAP_SIZE       (2*HPAGE_SIZE) 	/* Huge map page size */
  #define LOW_ADDR       (void *)(0x80000000)
+ #define LOW_ADDR2       (void *)(0x80000000+MAP_SIZE+HPAGE_SIZE)
  
  char* TEMPFILE="mmapfile";
***************
*** 152,157 ****
  		/* Attempt to mmap a huge page into a low memory address */
  		errno = 0;
! 		addr2 = mmap(NULL, HPAGE_SIZE, PROT_READ | PROT_WRITE,
! 			    MAP_SHARED, fildes, 0);
  		
  #if __WORDSIZE==64 /* 64-bit process */ 
--- 154,159 ----
  		/* Attempt to mmap a huge page into a low memory address */
  		errno = 0;
! 		addr2 = mmap(LOW_ADDR2, MAP_SIZE, PROT_READ | PROT_WRITE,
! 			    MAP_SHARED | MAP_FIXED, fildes, 0);
  		
  #if __WORDSIZE==64 /* 64-bit process */ 
***************
*** 180,184 ****
  		
  #if __WORDSIZE==64
! 		if (munmap(addr2, HPAGE_SIZE) != 0) {
  			tst_brkm(TFAIL, NULL, "huge munmap() fails to unmap the "
  				 "memory, errno=%d", errno);
--- 182,186 ----
  		
  #if __WORDSIZE==64
! 		if (munmap(addr2, MAP_SIZE) != 0) {
  			tst_brkm(TFAIL, NULL, "huge munmap() fails to unmap the "
  				 "memory, errno=%d", errno);



-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
Ltp-cvs mailing list
Ltp-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic