* libltp/lib/get_high_address.c (get_high_address): Get inaccessible
address more robustly. * winsup.api/ltp/stat06.c (high_address_setup): Use generic function from ltp library to obtain inaccessible address.
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
/* $Header$ */
|
||||
|
||||
/*
|
||||
* (C) COPYRIGHT CRAY RESEARCH, INC.
|
||||
* UNPUBLISHED PROPRIETARY INFORMATION.
|
||||
@ -7,9 +5,16 @@
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#ifdef __CYGWIN__
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
char *
|
||||
get_high_address()
|
||||
{
|
||||
#ifdef __CYGWIN__
|
||||
return VirtualAlloc (NULL, 4096, MEM_COMMIT, PAGE_NOACCESS) + 2048;
|
||||
#else
|
||||
return (char *)sbrk(0) + 16384;
|
||||
#endif
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* $Header$ */
|
||||
|
||||
/*
|
||||
* (C) COPYRIGHT CRAY RESEARCH, INC.
|
||||
* UNPUBLISHED PROPRIETARY INFORMATION.
|
||||
|
Reference in New Issue
Block a user