Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.05 KB

README.md

File metadata and controls

39 lines (31 loc) · 1.05 KB

opr

Single C/C++ header only that supports reducing process RAM usage.

platform

  • Windows x86 & x64
  • Linux

example

#include "opr.h"

int processId = 1024; // -1 for current process
int ret = opr_Clean(processId);
printf("process [%d]: %s\n",
    processId,
    ret == 1 ? "ok" : (ret == -1 ? "cannot access or does not exist" : "fail")
);

multiple languages

Bindings languages:

FFI supports

  • Create a new C source and add: #include "opr.h" (add DllMain if necessary)
  • Build as dynamic library/DLL with preprocessor: OPR_EXPORTS or BUILD_DLL
$ gcc -w -shared -O2 -o opr.dll -DBUILD_DLL src.c -lpsapi