{"id":17263393,"url":"https://github.com/0vercl0k/lockmem","last_synced_at":"2025-04-14T08:23:07.243Z","repository":{"id":46143935,"uuid":"284289186","full_name":"0vercl0k/lockmem","owner":"0vercl0k","description":"This utility allows you to lock every available memory regions of an arbitrary process into its working set.","archived":false,"fork":false,"pushed_at":"2023-05-06T18:17:12.000Z","size":2869,"stargazers_count":67,"open_issues_count":2,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T22:02:44.824Z","etag":null,"topics":["virtual-memory-management","windows","working-set"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0vercl0k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-01T15:43:02.000Z","updated_at":"2024-11-27T14:12:15.000Z","dependencies_parsed_at":"2024-10-15T07:56:42.882Z","dependency_job_id":"1623798b-4e24-4c43-89dd-f982d83028d2","html_url":"https://github.com/0vercl0k/lockmem","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0vercl0k%2Flockmem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0vercl0k%2Flockmem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0vercl0k%2Flockmem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0vercl0k%2Flockmem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0vercl0k","download_url":"https://codeload.github.com/0vercl0k/lockmem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844227,"owners_count":21170534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["virtual-memory-management","windows","working-set"],"created_at":"2024-10-15T07:56:24.619Z","updated_at":"2025-04-14T08:23:07.217Z","avatar_url":"https://github.com/0vercl0k.png","language":"C++","readme":"# lockmem\n![Builds](https://github.com/0vercl0k/lockmem/workflows/Builds/badge.svg)\n\nThis utility allows you to lock every available memory regions of an arbitrary process into its working set.\nIt uses `ntdll!NtLockVirtualMemory` (syscall used internally by [VirtualLock](https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtuallock)) to lock memory ranges as well as [GetProcessWorkingSetSizeEx](https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-getprocessworkingsetsizeex) and [SetProcessWorkingSetSizeEx](https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-setprocessworkingsetsizeex) to increase the size of the process' working set.\n\nThe Windows kernel guarantees that those pages will stay resident in memory, not written to the [pagefile](https://docs.microsoft.com/en-us/windows/client-management/introduction-page-file) and not incur a page fault on access.\n\n![lockmem](pics/lockmem.gif)\n\n## Build\n\n```text\n(base) c:\\lockmem\\src\u003enmake\n\nMicrosoft (R) Program Maintenance Utility Version 14.26.28806.0\nCopyright (C) Microsoft Corporation.  All rights reserved.\n\n        if not exist ..\\bin mkdir ..\\bin\n        cl /O1 /nologo /ZI /W3 /D_AMD64_ /DWIN_X64 /sdl /Fe..\\bin\\lockmem.exe lockmem.cc /link /nologo /debug:full ntdll.lib\nlockmem.cc\n        del *.obj *.pdb *.idb\n        if exist .\\bin del bin\\*.exp bin\\*.ilk bin\\*.lib\n\n(base) c:\\lockmem\\src\u003e..\\bin\\lockmem.exe\n./lockme \u003cprocess name | pid\u003e\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0vercl0k%2Flockmem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0vercl0k%2Flockmem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0vercl0k%2Flockmem/lists"}