You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a research project using some code adapted from NextEPC, in particular the libs1ap and libcore libraries that come bundled with NextEPC. I should add that the NextEPC codebase is really easy to understand and adapt, so many thanks to the whole NextEPC team for this.
Recently I was trying to clean up my code, and reduce memory leaks. I tried to use Valgrind to detect memory leaks, but unfortunately it didn't detect them. The simple example I tried was:
int main() {
core_initialize();
char *p;
p = (char *) core_malloc(19);
return 0;
}
However, all Valgrind detected was a 74-byte potential leak in core_initialize(), and not the un-free'd core_malloc(19).
I suspect this is due to the way that libcore manages it's own memory with the pkbuf and clbuf structures (which I admit I don't really understand), therefore making it incompatible with regular memory analysis tools such as valgrind.
Given the above, I'm wondering if there is alternative methods to finding memory leaks in code using libcore's memory allocation functions? I saw references to Valgrind in the NextEPC codebase, but I couldn't make those commands work on a default NextEPC installation (I just got lots of references to valgrind itself and bash, with no references to the EPC).
The text was updated successfully, but these errors were encountered:
I'm working on a research project using some code adapted from NextEPC, in particular the libs1ap and libcore libraries that come bundled with NextEPC. I should add that the NextEPC codebase is really easy to understand and adapt, so many thanks to the whole NextEPC team for this.
Recently I was trying to clean up my code, and reduce memory leaks. I tried to use Valgrind to detect memory leaks, but unfortunately it didn't detect them. The simple example I tried was:
However, all Valgrind detected was a 74-byte potential leak in core_initialize(), and not the un-free'd core_malloc(19).
I suspect this is due to the way that libcore manages it's own memory with the pkbuf and clbuf structures (which I admit I don't really understand), therefore making it incompatible with regular memory analysis tools such as valgrind.
Given the above, I'm wondering if there is alternative methods to finding memory leaks in code using libcore's memory allocation functions? I saw references to Valgrind in the NextEPC codebase, but I couldn't make those commands work on a default NextEPC installation (I just got lots of references to valgrind itself and bash, with no references to the EPC).
The text was updated successfully, but these errors were encountered: