lazy memory allocation
Anton Shterenlikht
mexas at bris.ac.uk
Mon Sep 2 14:23:35 UTC 2013
>From sgk at troutmask.apl.washington.edu Sat Aug 24 21:53:02 2013
>
>That's why you need to do 'allocate(a(10) :: source=0.)'. This
>will touch the memory, and should fail on lazy memory allocators
>if memory isn't available.
I'm looking at MFE, section 15.4.3 Sourced allocation.
I think your syntax is wrong. It should be:
allocate( a(10), source = 0. )
The double colon (::) is used for typed allocation.
Just in case somebody will be reading the archives...
Thanks again
Anton
More information about the freebsd-fortran
mailing list