Reputation: 21
Is it possible to allocate memory without the mmap2
call?
I was working on A10 board video player, where I have a huge memory leak. possibly in each frame displayer. There is a library libvecore
which handles system call and we don't have the source.
I know that A10 is not common subject so my question is not for A10 but for kernel memory alloc.
I try to trace the program with: strace -e mmap2 ./VideoPlayer
.
But I'm surprised with the result. It's not calling mmap2
while video player it calls only on startup.
But at the same time I see memory usage from TOP
I can see VideoPlayer is contentiously allocating memory and it almost eats up 300 MB in 3 min.
So should I consider that the memory leak is in the kernel? Or there is any other call to allocate memory dynamically?
Upvotes: 0
Views: 1119
Reputation: 215221
Yes, the normal way memory is allocated is via the brk
system call.
Upvotes: 3