The R Project SVN R

Rev

Rev 16538 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16538 Rev 17260
Line 1047... Line 1047...
1047
	if (gAddressBase == 0) {
1047
	if (gAddressBase == 0) {
1048
	    gReservedSize = max (R_reserved_size, AlignPage64K(size));
1048
	    gReservedSize = max (R_reserved_size, AlignPage64K(size));
1049
	    gNextAddress = gAddressBase =
1049
	    gNextAddress = gAddressBase =
1050
		(unsigned int)VirtualAlloc (NULL, gReservedSize,
1050
		(unsigned int)VirtualAlloc (NULL, gReservedSize,
1051
					    MEM_RESERVE, PAGE_NOACCESS);
1051
					    MEM_RESERVE, PAGE_NOACCESS);
1052
	    if(!gAddressBase)
1052
	    if(!gAddressBase) {
-
 
1053
		/* can't R_Suicide here
1053
		R_Suicide("unable to reserve initial space in wsbrk");
1054
		   R_Suicide("unable to reserve initial space in wsbrk"); */
-
 
1055
		MessageBox(0, "Cannot reserve memory:\nterminating", 
-
 
1056
			   "R fatal error",
-
 
1057
			   MB_TASKMODAL | MB_ICONSTOP | MB_OK);
-
 
1058
		exit(3);
-
 
1059
	    }
1054
	} else if (AlignPage (gNextAddress + size) > (gAddressBase +
1060
	} else if (AlignPage (gNextAddress + size) > (gAddressBase +
1055
						      gReservedSize)) {
1061
						      gReservedSize)) {
1056
	    long new_size = max (NEXT_SIZE, AlignPage64K(size));
1062
	    long new_size = max (NEXT_SIZE, AlignPage64K(size));
1057
	    void *new_address = (void*)(gAddressBase+gReservedSize);
1063
	    void *new_address = (void*)(gAddressBase+gReservedSize);
1058
	    do {
1064
	    do {