The R Project SVN R

Rev

Rev 11100 | Rev 12256 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11100 Rev 11781
Line 1094... Line 1094...
1094
	/* Trim by decommiting the virtual memory */
1094
	/* Trim by decommiting the virtual memory */
1095
	if (alignedGoal >= gAddressBase)
1095
	if (alignedGoal >= gAddressBase)
1096
	{
1096
	{
1097
	    VirtualFree ((void*)alignedGoal, gNextAddress - alignedGoal,
1097
	    VirtualFree ((void*)alignedGoal, gNextAddress - alignedGoal,
1098
			 MEM_DECOMMIT);
1098
			 MEM_DECOMMIT);
1099
	    gNextAddress = gNextAddress + size;
-
 
1100
	    totalAllocated -= gNextAddress - alignedGoal;
1099
	    totalAllocated -= gNextAddress - alignedGoal;
-
 
1100
	    gNextAddress = gNextAddress + size;
1101
	    return (void*)gNextAddress;
1101
	    return (void*)gNextAddress;
1102
	}
1102
	}
1103
	else /* requested release of more than we have in this block */
1103
	else /* requested release of more than we have in this block */
1104
	{
1104
	{
1105
	    VirtualFree ((void*)gAddressBase, gNextAddress - gAddressBase,
1105
	    VirtualFree ((void*)gAddressBase, gNextAddress - gAddressBase,
1106
			 MEM_DECOMMIT);
1106
			 MEM_DECOMMIT);
1107
	    gNextAddress = gAddressBase;
-
 
1108
	    totalAllocated -= gNextAddress - gAddressBase;
1107
	    totalAllocated -= gNextAddress - gAddressBase;
-
 
1108
	    gNextAddress = gAddressBase;
1109
	    return (void*)-1;
1109
	    return (void*)-1;
1110
	}
1110
	}
1111
    } else { /* size = 0 */
1111
    } else { /* size = 0 */
1112
	return (void*)gNextAddress;
1112
	return (void*)gNextAddress;
1113
    }
1113
    }