Re: [Rd] R extension memory leak detection question

2021-04-05 Thread xiaoyan yu
Thanks for your quick response. It is also surprising for us to notice the memory accumulation when running our program since it has been years since we developed our program. Here is the memory status I observed from 15384k to 234208k to 242024k without decreasing when running the test program. [B

Re: [Rd] R extension memory leak detection question

2021-04-05 Thread Dirk Eddelbuettel
On 5 April 2021 at 18:27, xiaoyan yu wrote: | Thank you all for your help. | We embedded R in our program and found the memory in the process | accumulated while our expectation is that the memory will go down after | each R evaluation. | I started to write a test program with only a few lines of

Re: [Rd] R extension memory leak detection question

2021-04-05 Thread xiaoyan yu
Thank you all for your help. We embedded R in our program and found the memory in the process accumulated while our expectation is that the memory will go down after each R evaluation. I started to write a test program with only a few lines of R embedded codes and found the memory never went down e

Re: [Rd] R extension memory leak detection question

2021-03-19 Thread Lionel Henry
> Still, memory leaks are possible if the program forgets about a > pointer to some piece of memory no longer needed, and keeps that > pointer in say some global structure. Such memory leaks would not be > found using address sanitizer. We had a few cases of this in the past. Given the difficulty

Re: [Rd] R extension memory leak detection question

2021-03-15 Thread Tomas Kalibera
On 3/12/21 7:43 PM, xiaoyan yu wrote: I am writing C++ program based on R extensions and also try to test the program with google address sanitizer. I thought if I don't protect the variable from the allocation API such as Rf_allocVector, there will be a memory leak. However, the address sanitiz