부모글 보이기/감추기 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) 13415정성태9/18/202311859닷넷: 2144. C# 12 - 컬렉션 식(Collection Expressions) [2]13414정성태9/16/202311197디버깅 기술: 193. Windbg - ThreadStatic 필드 값을 조사하는 방법13413정성태9/14/202312033닷넷: 2143. C# - 시스템 Time Zone 변경 시 이벤트 알림을 받는 방법13412정성태9/14/202315530닷넷: 2142. C# 12 - 인라인 배열(Inline Arrays) [1]13411정성태9/12/202311826Windows: 252. 권한 상승 전/후 따로 관리되는 공유 네트워크 드라이브 정보 [1]13410정성태9/11/202313302닷넷: 2141. C# 12 - Interceptor (컴파일 시에 메서드 호출 재작성) [1]13409정성태9/8/202312603닷넷: 2140. C# - Win32 API를 이용한 모니터 전원 끄기13408정성태9/5/202312172Windows: 251. 임의로 만든 EXE 파일을 포함한 ZIP 파일의 압축을 해제할 때 Windows Defender에 의해 삭제되는 경우13407정성태9/4/202311999닷넷: 2139. C# - ParallelEnumerable을 이용한 IEnumerable에 대한 병렬 처리13406정성태9/4/202311794VS.NET IDE: 186. Visual Studio Community 버전의 라이선스13405정성태9/3/202312909닷넷: 2138. C# - async 메서드 호출 원칙13404정성태8/29/202313052오류 유형: 876. Windows - 키보드의 등호(=, Equals sign) 키가 눌리지 않는 경우13403정성태8/21/202311689오류 유형: 875. The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF13402정성태8/20/202311898닷넷: 2137. ILSpy의 nuget 라이브러리 버전 - ICSharpCode.Decompiler13401정성태8/19/202311876닷넷: 2136. .NET 5+ 환경에서 P/Invoke의 성능을 높이기 위한 SuppressGCTransition 특성 [1]13400정성태8/10/202311548오류 유형: 874. 파이썬 - pymssql을 윈도우 환경에서 설치 불가13399정성태8/9/202310464닷넷: 2135. C# - 지역 변수로 이해하는 메서드 매개변수의 값/참조 전달13398정성태8/3/202313452스크립트: 55. 파이썬 - pyodbc를 이용한 SQL Server 연결 사용법13397정성태7/23/202312511닷넷: 2134. C# - 문자열 연결 시 string.Create를 이용한 GC 할당 최소화13396정성태7/22/202311911스크립트: 54. 파이썬 pystack 소개 - 메모리 덤프로부터 콜 스택 열거13395정성태7/20/202311153개발 환경 구성: 685. 로컬에서 개발 중인 ASP.NET Core/5+ 웹 사이트에 대해 localhost 이외의 호스트 이름으로 접근하는 방법13394정성태7/16/202310484오류 유형: 873. Oracle.ManagedDataAccess.Client - 쿼리 수행 시 System.InvalidOperationException13393정성태7/16/202311212닷넷: 2133. C# - Oracle 데이터베이스의 Sleep 쿼리 실행하는 방법13392정성태7/16/202310804오류 유형: 872. Oracle - ORA-01031: insufficient privileges13391정성태7/14/202311186닷넷: 2132. C# - sealed 클래스의 메서드를 callback 호출했을 때 인라인 처리가 될까요?13390정성태7/12/202311135스크립트: 53. 파이썬 - localhost 호출 시의 hang 현상 ... 16 17 18 19 20 [21] 22 23 24 25 26 27 28 29 30 ...