home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / fortran / 5147 < prev    next >
Encoding:
Text File  |  1993-01-23  |  1.6 KB  |  36 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!gatech!hubcap!jtbell
  3. From: jtbell@hubcap.clemson.edu (Jon Bell)
  4. Subject: Re: Block Data is evil
  5. Message-ID: <1993Jan23.151052.6593@hubcap.clemson.edu>
  6. Organization: Presbyterian College, Clinton SC
  7. References: <1993Jan21.074755.14939@arcetri.astro.it> <1993Jan22.183106.15813@newshost.lanl.gov> <C1AMpC.BAt@umassd.edu>
  8. Date: Sat, 23 Jan 1993 15:10:52 GMT
  9. Lines: 25
  10.  
  11. In article <C1AMpC.BAt@umassd.edu> hshubs@cis.umassd.edu (Howard S Shubs) writes:
  12. >In <1993Jan22.183106.15813@newshost.lanl.gov> jlg@cochiti.lanl.gov (J. Giles) writes:
  13. >
  14. >>Yes, and that permits you to do run-time management of a statically
  15. >>allocated "maximum" space.  You figure out what the maximum memory
  16. >>you ever need is and you statically allocate that much:
  17. >
  18. >>      PARAMETER (MAXMEM=1000000)
  19. >>      COMMON /MEMORY/ MEM(MAXMEM)
  20. >
  21. >>This reserves one million integer sized words.  Now, you can write
  22. >>a MALLOC routine which returns avalable space from within this array
  23. >>in the form of an index (you actually have two mallocs, one for
  24. >>integers and reals, the other for complex and doubles - since the
  25. >>indices must be scaled differently).  To use:
  26. >
  27. >You're not seriously suggesting that this be used in production code,
  28. >are you?  If you are, is this intended as job security?
  29.  
  30. It's already been done.  When I was a grad student in experimental
  31. particle physics, I worked with CERN's HYDRA library, which implemented
  32. dynamic memory allocation in FORTRAN using the same basic idea.  I 
  33. think this package is still widely used in particle physics.
  34.  
  35. Jon Bell / Dept. of Physics & C.S. / Presbyterian College / Clinton SC USA
  36.