부모글 보이기/감추기 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 비밀번호 댓글 작성자 ... 91 92 [93] 94 95 96 97 98 99 100 101 102 103 104 105 ... NoWriterDateCnt.TitleFile(s) 11610정성태7/15/201817387Graphics: 5. Unity로 실습하는 Shader (3) - 고로 셰이딩(gouraud shading) + 퐁 모델(Phong model) + Texture11609정성태7/15/201820390Graphics: 4. Unity로 실습하는 Shader (2) - 고로 셰이딩(gouraud shading) + 퐁 모델(Phong model)11608정성태7/15/201824949Graphics: 3. Unity로 실습하는 Shader (1) - 컬러 반전 및 상하/좌우 뒤집기11607정성태7/14/201825292Graphics: 2. Unity로 실습하는 Shader [1]11606정성태7/13/201825932사물인터넷: 19. PC에 연결해 동작하는 자신만의 USB 장치 만들어 보기111605정성태7/13/201821728사물인터넷: 18. New NodeMCU v3 아두이노 호환 보드의 내장 LED 및 입력 핀 사용법 [1]111604정성태7/12/201820839Math: 47. GeoGebra 기하 (24) - 정다각형111603정성태7/12/201816908Math: 46. GeoGebra 기하 (23) - sqrt(n) 제곱근111602정성태7/11/201817071Math: 45. GeoGebra 기하 (22) - 반전기하학의 원에 관한 반사변환111601정성태7/11/201819849Math: 44. GeoGebra 기하 (21) - 반전기하학의 직선 및 원에 관한 반사변환111600정성태7/10/201818301Math: 43. GeoGebra 기하 (20) - 세 점을 지나는 원111599정성태7/10/201817611Math: 42. GeoGebra 기하 (19) - 두 원의 안과 밖으로 접하는 직선111598정성태7/10/201819489Windows: 147. 시스템 복구 디스크를 USB 디스크에 만드는 방법11597정성태7/10/201821593사물인터넷: 17. Thinary Electronic - ATmega328PB 아두이노 호환 보드의 개발 환경 구성11596정성태7/10/201819545기타: 72. 과거의 용어 설명 - OWIN11595정성태7/10/201825300사물인터넷: 16. New NodeMCU v3 아두이노 호환 보드의 기본 개발 환경 구성11594정성태7/8/201819679Math: 41. GeoGebra 기하 (18) - 원의 중심 및 접선111593정성태7/8/201818683Math: 40. GeoGebra 기하 (17) - 각의 복사111591정성태7/7/201818037Math: 39. GeoGebra 기하 (16) - 삼각형의 방심과 방접원111590정성태7/7/201817594Math: 38. GeoGebra 기하 (15) - 삼각형의 수심111589정성태7/7/201817863.NET Framework: 787. object로 형변환된 인스턴스를 원래의 타입 인자로 제네릭 메서드를 호출하는 방법 [2]111588정성태7/7/201819325디버깅 기술: 116. windbg 분석 사례 - ASP.NET 웹 응용 프로그램의 CPU 100% 현상 (3)11587정성태7/5/201818926.NET Framework: 786. ASP.NET - HttpCookieCollection을 다중 스레드에서 사용할 경우 무한 루프 현상11586정성태7/5/201818116Math: 37. GeoGebra 기하 (14) - 삼각형의 무게 중심111585정성태7/5/201818282Math: 36. GeoGebra 기하 (13) - 삼각형의 외심과 외접하는 원111584정성태7/5/201818269Math: 35. GeoGebra 기하 (12) - 삼각형의 내심과 내접하는 원1 ... 91 92 [93] 94 95 96 97 98 99 100 101 102 103 104 105 ...