Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

Intel Fortran/C mixed programming, memory reusability problem...

johnix
Beginner
326 Views
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
0 Kudos
0 Replies
Reply