Welcome to mirror list, hosted at ThFree Co, Russian Federation.

get_high_address.c « lib « libltp « testsuite « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5fe1e81b29f93dac28543c5b898adecf216cc1d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 *	(C) COPYRIGHT CRAY RESEARCH, INC.
 *	UNPUBLISHED PROPRIETARY INFORMATION.
 *	ALL RIGHTS RESERVED.
 */

#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
}