- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have some problems about memory reuse between C & Fortran.
I think this particular problem actually has two folds:
1. glibc-2.3 has changed the behavior of its "malloc", so "free" is not guaranteed to return memory back to OS (they call this "cache") according to Glibc manual. This means later memory allocation can reuse the previous freed memory without increasing the process vmsize.
2. In mixed C/Fortran mode, it seems this machanism is NOT working, which means previous freed memory by the C function will not be reusable by later Fortran subroutines.
I have already posted issue 1 in the Intel C++ forum. All I want is to disable this kind of cache machanism. But it seems there is no reply on my post. So I have to come here to ask if anyone knows what's behind the fortran "allocate". Is it implemented with "malloc" and which version of it?
Any hint is appreciated.
Johnix
I have some problems about memory reuse between C & Fortran.
I think this particular problem actually has two folds:
1. glibc-2.3 has changed the behavior of its "malloc", so "free" is not guaranteed to return memory back to OS (they call this "cache") according to Glibc manual. This means later memory allocation can reuse the previous freed memory without increasing the process vmsize.
2. In mixed C/Fortran mode, it seems this machanism is NOT working, which means previous freed memory by the C function will not be reusable by later Fortran subroutines.
I have already posted issue 1 in the Intel C++ forum. All I want is to disable this kind of cache machanism. But it seems there is no reply on my post. So I have to come here to ask if anyone knows what's behind the fortran "allocate". Is it implemented with "malloc" and which version of it?
Any hint is appreciated.
Johnix
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page