This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR28105 Overflow check for memory allocation
On Wed, Dec 15, 2010 at 12:18:16PM +0200, Janne Blomqvist wrote:
>
> OTOH since we're calling _gfortran_os_error which calls perror() we
> get the same message twice just worded slightly differently. E.g.
>
> $ ./largealloc
> Operating system error: Cannot allocate memory
> Out of memory
>
> which is a bit redundant. So maybe just an empty string (or NULL)
> is sufficient?
>
In the above, how about changing "Out of memory" to
"Allocation would exceed system or user memory limit".
Thus, one would get
$ ./largealloc
Operating system error: Cannot allocate memory
Allocation would exceed system or user memory limit
Second, provides a hint to user where to look for
the problem. Whatever you decide is fine with me.
--
Steve