부모글 보이기/감추기 AD BLOCK 해제 요청 이 글에는 광고가 많이 들어가 있지 않습니다. adblock을 해제하셔도 글을 읽는데 그다지 부담이 없으니 해제를 부탁드립니다. EmptyWorkingSet Win32 API를 사용하는 C# 예제 그냥... 아래의 질문에 대한 답으로 작성한 간단한 예제입니다. [c#] EmptyWorkingSet 사용 중 에러 ; http://social.msdn.microsoft.com/Forums/ko-KR/6dff23f4-ece9-43a4-8f6b-3528cca5b4c4/c-emptyworkingset-?forum=dotnetko 참고로, 아래의 코드는 자신의 프로세스에 대한 메모리를 조정하는 것이므로 관리자 권한으로 승격된 프로세스가 아니어도 잘 동작합니다. using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace ConsoleApplication1 { class Program { [DllImport("psapi.dll")] public static extern int EmptyWorkingSet(IntPtr hProcess); static void Main(string[] args) { IntPtr processHandle = Process.GetCurrentProcess().Handle; Console.WriteLine("WorkingSet Mem Size: " + Process.GetCurrentProcess().WorkingSet64); Console.ReadLine(); int result = EmptyWorkingSet(processHandle); Console.WriteLine("Result: " + ((result != 0) ? "Success" : "Failed")); Console.WriteLine("WorkingSet Mem Size: " + Process.GetCurrentProcess().WorkingSet64); } } } 예제 코드는 첨부 파일로 넣어두었습니다. [이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.] [다음 글] 오류 유형: 237. Windows Media Player cannot access the file. The file might be in use, you might not have access to the computer where the file is stored, or your proxy settings might not be correct.[이전 글] Windows: 99. INetCache 폴더가 다르게 보이는 이유 [최초 등록일: 8/13/2014] [최종 수정일: 8/14/2014] 이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다. by SeongTae Jeong, mailto:techsharer at outlook.com 비밀번호 댓글 작성자 ... 16 17 [18] 19 20 21 22 23 24 25 26 27 28 29 30 ... NoWriterDateCnt.TitleFile(s) 13495정성태12/20/202310863Linux: 65. clang++로 공유 라이브러리의 -static 옵션 빌드가 가능할까요?13494정성태12/20/202310937Linux: 64. Linux 응용 프로그램의 (C++) so 의존성 줄이기(ReleaseMinDependency) - 두 번째 이야기13493정성태12/19/202311060닷넷: 2185. C# - object를 QueryString으로 직렬화하는 방법13492정성태12/19/202310440개발 환경 구성: 699. WSL에 nopCommerce 예제 구성13491정성태12/19/20239442Linux: 63. 리눅스 - 다중 그룹 또는 사용자를 리소스에 권한 부여13490정성태12/19/202310160개발 환경 구성: 698. Golang - GLIBC 의존을 없애는 정적 빌드 방법13489정성태12/19/202310105개발 환경 구성: 697. GoLand에서 ldflags 지정 방법13488정성태12/18/20239556오류 유형: 884. HTTP 500.0 - 명령행에서 실행한 ASP.NET Core 응용 프로그램을 실행하는 방법13487정성태12/16/202310670개발 환경 구성: 696. C# - 리눅스용 AOT 빌드를 docker에서 수행 [1]13486정성태12/15/20239790개발 환경 구성: 695. Nuget config 파일에 값 설정/삭제 방법13485정성태12/15/20239451오류 유형: 883. dotnet build/restore - error : Root element is missing13484정성태12/14/202310199개발 환경 구성: 694. Windows 디렉터리 경로를 WSL의 /mnt 포맷으로 구하는 방법13483정성태12/14/202310471닷넷: 2184. C# - 하나의 resource 파일을 여러 프로그램에서 (AOT 시에도) 사용하는 방법113482정성태12/13/202311773닷넷: 2183. C# - eFriend Expert OCX 예제를 .NET Core/5+ Console App에서 사용하는 방법 [2]113481정성태12/13/202310615개발 환경 구성: 693. msbuild - .NET Core/5+ 프로젝트에서 resgen을 이용한 리소스 파일 생성 방법113480정성태12/12/202312449개발 환경 구성: 692. Windows WSL 2 + Chrome 웹 브라우저 설치13479정성태12/11/202310095개발 환경 구성: 691. WSL 2 (Ubuntu) + nginx 환경 설정13477정성태12/8/202310753닷넷: 2182. C# - .NET 7부터 추가된 Int128, UInt128 [1]113476정성태12/8/202310636닷넷: 2181. C# - .NET 8 JsonStringEnumConverter의 AOT를 위한 개선113475정성태12/7/202310970닷넷: 2180. .NET 8 - 함수 포인터에 대한 Reflection 정보 조회113474정성태12/6/202310429개발 환경 구성: 690. 닷넷 코어/5+ 버전의 ilasm/ildasm 실행 파일 구하는 방법 - 두 번째 이야기13473정성태12/5/202310820닷넷: 2179. C# - 값 형식(Blittable)을 메모리 복사를 이용해 바이트 배열로 직렬화/역직렬화113472정성태12/4/202310186C/C++: 164. Visual C++ - InterlockedCompareExchange128 사용 방법13471정성태12/4/202310727Copilot - To enable GitHub Copilot, authorize this extension using GitHub's device flow13470정성태12/2/202311380닷넷: 2178. C# - .NET 8부터 COM Interop에 대한 자동 소스 코드 생성 도입 [1]113469정성태12/1/202311342닷넷: 2177. C# - (Interop DLL 없이) CoClass를 이용한 COM 개체 생성 방법1 ... 16 17 [18] 19 20 21 22 23 24 25 26 27 28 29 30 ...