Hello,
I am trying to find a memory leak in my code. For test purposes I made a simple program where I create and delete context in an infinite loop. RSS section of ps command on linux is persistently (~1MB per sec) increasing during the run. Could it be some sort of memory leak there?
#include <iostream>
#include <optix.h>
int main() {
for (;;) {
RTcontext ctx = {0};
RTresult r = rtContextCreate(&ctx);
if (r != RT_SUCCESS) {
std::cout << "Failed to create context: " << r << std::endl;
return -1;
}
r = rtContextDestroy(ctx);
if (r != RT_SUCCESS) {
std::cout << "Failed to destroy context: " << r << std::endl;
return -2;
}
}
return 0;
}
Optix: NVIDIA-OptiX-SDK-3.8.0-linux64
Driver Version: 352.21
UPDATE:
Also tried it with
NVIDIA-OptiX-SDK-3.6.0-linux64 - more or less the same behavior;
NVIDIA-OptiX-SDK-3.5.1-PRO-linux64 - RSS also increases, but slower that in 3.6.0 and 3.8.0.