ygc (GC Yang)
- Login: ygc
- Email: guchen.yang@fugawi.com
- Registered on: 10/27/2015
- Last sign in: 10/27/2015
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
10/28/2015
-
04:27 PM Ruby Bug #11626: fprintf in c extension keep adding memory usage
- Nobuyoshi Nakada wrote:
> Nothing related to ruby, you just collapse the heap by repeatedly appending strings to the same area.
> ...
Got it, I should have set the pointer to NULL. Commenting out fprintf works fine made me think it is ...
10/27/2015
-
09:43 PM Ruby Bug #11626 (Rejected): fprintf in c extension keep adding memory usage
- `fprintf` will keep adding memory usage without releasing it.
I was doing it in rails console, not sure if it makes any different. The code like this:
~~~c
VALUE leak (VALUE self, VALUE in) {
char *str = StringValuePtr(in);
...