Hi,

I'm running a multi-threaded application using pthreads + m5threads using SE 
mode. I see that as the simulation progresses, the memory consumption keeps 
increasing for the process until it gets killed. the process map shows that the 
address space is getting filled up with the application's code segment 
(r---s-), (hello-world-pthreads for example) and with eveery new thread I see a 
new mapping in the address space, like so.

00007f84a757e000    8268    6220       0 r--s- hello-world-pthread
00007f84a7d91000    8268    6860       0 r--s- hello-world-pthread
00007f84a85a4000    8268    6860       0 r--s- hello-world-pthread
00007f84a8db7000    8268    6920       0 r--s- hello-world-pthread
00007f84a95ca000    8268    6908       0 r--s- hello-world-pthread
00007f84a9ddd000    8268    6860       0 r--s- hello-world-pthread
00007f84aa5f0000    8268    6860       0 r--s- hello-world-pthread
00007f84aae03000    8268    6860       0 r--s- hello-world-pthread
...
...
...

I checked the m5threads implementation - the TCB is allocated using an mmap. 
The mmap is getting trapped correctly in gem5. I've uncommented the munmap in 
m5threads pthread_join to be safe to ensure this is unmapped and released.

I suspect the actual segment mapping is done by the clone syscall (Sorry not an 
expert in this, I may be wrong) and typically when the thread completes, these 
mappings should be freed?

Any insights on how I can fix this? If anyone has faced this issue before? 
Would appreciate pointers to this.

Thank you,
-Andronicus


_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to