부모글 보이기/감추기 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 비밀번호 댓글 작성자 ... 136 137 138 139 140 141 142 143 144 145 146 147 [148] 149 150 ... NoWriterDateCnt.TitleFile(s) 1353정성태9/17/201225753.NET Framework: 337. Python의 생성기와 코루틴을 C#으로 표현하면. [2]11352정성태9/13/201223808.NET Framework: 336. .NET Profiler가 COM 개체일까?1351정성태9/13/201228224디버깅 기술: 49. windbg - .NET Framework 스레드 개체의 COM Apartment 유형 확인하는 방법1350정성태9/12/201228902개발 환경 구성: 167. (실은) 무료가 아니었던 AWS EC2 서비스 [4]1349정성태9/11/201260607VS.NET IDE: 74. Visual Studio의 '새 파일'을 UTF-8 인코딩으로 지정하는 방법 [4]1348정성태9/11/201228081오류 유형: 164. Active Directory - Functional Level 승격이 안 되는 문제1347정성태9/10/201230494Windows: 62. 윈도우 서버 2012 - Hyper-V 서버 마이그레이션 [1]1346정성태9/10/201231394Windows: 61. 윈도우 서버 2012 - Active Directory 서버 마이그레이션1345정성태9/10/201235434스크립트: 12. 파이썬 - Win32 DLL 연동 [2]1344정성태9/10/201228557오류 유형: 163. .NET Framework 4.5 제거 후 Visual Studio 2010 실행 시 Unknown Error1343정성태9/8/201242317스크립트: 11. 파이썬(Python) 윈도우 개발 환경 [7]1342정성태9/6/201226481VS.NET IDE: 73. Visual Studio 2012 - XmlCodeGenerator 마이그레이션1341정성태9/4/201235832Windows: 60. Hyper-V에서 RemoteFX 없이 DirectX 11 제공 [12]1340정성태9/4/201228029개발 환경 구성: 166. DOS - ping 결과에서 평균 응답 시간값 추출하기 [3]1339정성태9/4/201230455개발 환경 구성: 165. 새로운 Visual Studio 2012 원격 디버깅 툴 [5]1338정성태9/4/201232283.NET Framework: 335. C# - (핸들을 이용하여) 모든 열린 파일을 열람 [6]11337정성태8/30/201222055Phone: 7. 디버거로 실습해 보는 윈도우 폰의 Tombstone 상태11336정성태8/30/201240106.NET Framework: 334. 스레드 비정상 종료로 발생하는 CLOSE_WAIT 소켓 상태 [2]11335정성태8/30/201228843Windows: 59. Hyper-V Internal 네트워크 VM의 인터넷 접속1334정성태8/29/201248111.NET Framework: 333. 코드로 재현하는 소켓 상태(FIN_WAIT1, FIN_WAIT2, TIME_WAIT, CLOSE_WAIT, LAST_WAIT) [6]1333정성태8/27/201251593개발 환경 구성: 164. system32 폴더에 있는 파일의 권한 조정 [2]1332정성태8/23/201223489Team Foundation Server: 48. TFS - Team Project Collection 이전하는 방법1331정성태8/23/201226640오류 유형: 162. Database '...' already exists. Choose a different database name. (Microsoft SQL Server, Error: 1801)1330정성태8/22/201227397Team Foundation Server: 47. 5인 이내의 팀, 또는 개인 로컬 소스 관리를 위한 무료 TFS Express1329정성태8/21/201222852오류 유형: 161. Azure - Storage 삭제가 안되는 경우 [1]1328정성태8/20/201233275개발 환경 구성: 163. IIS 7 - "MIME Types" 설정 아이콘이 없는 경우 ... 136 137 138 139 140 141 142 143 144 145 146 147 [148] 149 150 ...