Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit bb24327

Browse files
committed
Simple project to test memory
1 parent cd0a2b7 commit bb24327

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed

Program.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Diagnostics;
3+
using System.IO;
4+
5+
namespace UpgradeAssistantPrefer32Bit
6+
{
7+
class Program
8+
{
9+
static void Main(string[] args)
10+
{
11+
var array = new byte[100000];
12+
var memory = new MemoryStream();
13+
14+
try
15+
{
16+
while (true)
17+
{
18+
memory.Write(array, 0, array.Length);
19+
}
20+
}
21+
catch
22+
{
23+
Console.WriteLine($"PrivateMemory: {Process.GetCurrentProcess().PrivateMemorySize64:N0}");
24+
}
25+
26+
Console.WriteLine("Press any key to exit.");
27+
Console.ReadKey();
28+
}
29+
}
30+
}

UpgradeAssistantPrefer32Bit.csproj

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{E431266B-9891-44CF-8490-BD4F3CF1E68C}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>UpgradeAssistantPrefer32Bit</RootNamespace>
10+
<AssemblyName>UpgradeAssistantPrefer32Bit</AssemblyName>
11+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<Deterministic>true</Deterministic>
14+
<TargetFrameworkProfile />
15+
<PlatformTarget>AnyCPU</PlatformTarget>
16+
<Prefer32Bit>true</Prefer32Bit>
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
</ItemGroup>
39+
<ItemGroup>
40+
<Compile Include="Program.cs" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<Folder Include="Properties\" />
44+
</ItemGroup>
45+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
46+
</Project>

UpgradeAssistantPrefer32Bit.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.3.32819.101
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpgradeAssistantPrefer32Bit", "UpgradeAssistantPrefer32Bit.csproj", "{E431266B-9891-44CF-8490-BD4F3CF1E68C}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{E431266B-9891-44CF-8490-BD4F3CF1E68C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{E431266B-9891-44CF-8490-BD4F3CF1E68C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{E431266B-9891-44CF-8490-BD4F3CF1E68C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{E431266B-9891-44CF-8490-BD4F3CF1E68C}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {8A7B41A0-A308-4604-9B17-C8FA8DCE7008}
24+
EndGlobalSection
25+
EndGlobal

0 commit comments

Comments
 (0)