I have an application written in C++ running on the Vxworks OS. I have some issue where after days/weeks the application exhibits some unusual behavior so I'm trying different testing techniques where one includes eating up app memory by calling calloc, in a delayed loop, and not freeing it. I have over 10megs I can eat up but the app crashes when the calloc calls reach a count of about 1700. This happens weather I'm allocating 1 byte or 100 bytes. So I guess I'm asking is there some other limitation on the calls to malloc/calloc besides the amount of memory being called but not freed? Thanks
Asked
Active
Viewed 154 times
1
-
There will necessarily be some bookkeeping overhead for every `malloc` call, regardless of how much memory you're requesting. However, 10MB/1700 = 588 bytes sounds excessive, so there's probably another problem. This *might* be best solved with something like Valgrind. – Oliver Charlesworth Jul 09 '17 at 22:07
-
3Does Valgrind work with Vxworks? I thought it was only for Linux systems – atomic928 Jul 09 '17 at 22:12
-
PS I'm running Tornado on a Windows machine. – atomic928 Jul 09 '17 at 22:15
-
valgrind is a linux tool, though it might run under MinGW64. There are other memory checking tools for windows. https://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows – Serge Jul 09 '17 at 22:58