Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Weiping Hu <Hu.Weiping@dsto.defence.gov.au>
To: axp-list@redhat.com
Subject: Re: G77 dynamic memory allocation
Date: 02 Jul 1998 03:36:51 +0200	[thread overview]
Message-ID: <m3u3516nkc.fsf@venus.dsto.defence.gov.au> (raw)
In-Reply-To: Larry Zimmerman's message of "Wed, 1 Jul 1998 03:49:44 -0600"

Larry,

I just tried this, and got the following result.  There is a segmentation fault.  I run egcs-1.0.2-8 on RH5.1, i386.  Was the test for Alpha only?

Regards,
Weiping


[huw@venus Test]$ make
egcs -g -static -Wall -DUSE_FALLOC -DHAVE_64BIT_ADDR -c falloc.c
g77 -fintrin-case-any -fmatch-case-any -DUSE_FALLOC -DHAVE_64BIT_ADDR -c mysubs.F
g77 -fintrin-case-any -fmatch-case-any -DUSE_FALLOC -DHAVE_64BIT_ADDR lzmemtest.F falloc.o mysubs.o -static -lc -o lzmemtest
[huw@venus Test]$ ./lzmemtest
 lzmemtest: Started

  lzmemtest: nreal  300 nint  300 kint  150
 fmalloc: trying to allocate 2400 bytes
  Address of real*8 array is  4429655688
  realinit: Initializing Real Array
  realinit: Start of array address is  134688392
 fmalloc: trying to allocate 2400 bytes
  Address of integer array is  578379606387013616
  intinit: Initializing Integer Array
  intinit: Start of array address is  134690800
  End of 2nd array is  578379606387016016
  Start of K subarray is  578379606387014816
  Mysub: Checking values in arrays
Segmentation fault (core dumped)         

Larry Zimmerman <laz@walleye.gonefishing.sk.ca> writes:

> This is sort of a followup to the thread "malloc oddity ?"
> 
> I am interested in this subject because I'm trying to port
> some FORTRAN code to Linux that uses structures and dynamic
> memory allocation. AFAIK, egcs/g77 does not directly support
> dynamic memory allocation, but Mike Tripicco let me look at
> their code for dynamic array sizing. I tried a slight modification
> of Mike's code, then managed to get "real" dynamic memory
> allocation working!
> 
> This is not as clean as using compiler-supported functions,
> but it seems to work for me in my test program. If you're
> interested, you can get the details at:
> http://walleye.gonefishing.sk.ca/laz/linux/falloc.html
> 
> My test program, etc. are accessible through this web page.
> 
> Thanks to Mike and others who commented on Linux-Alpha memory
> allocation for helping to solve one of my key porting problems.
> 
> Now if the g77 guys would just move structures higher up the priority
> list!!
> 
> Larry Z.
> 
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


  reply	other threads:[~1998-07-02  1:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-01  9:49 G77 dynamic memory allocation Larry Zimmerman
1998-07-02  1:36 ` Weiping Hu [this message]
     [not found] <Hu.Weiping@dsto.defence.gov.au>
1998-07-02  5:10 ` Larry Zimmerman
  -- strict thread matches above, loose matches on Subject: below --
1998-07-02  5:55 G77 Dynamic Memory Allocation Larry Zimmerman
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox