home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / shpalloc.z / shpalloc
Encoding:
Text File  |  2002-10-03  |  3.2 KB  |  50 lines

  1.  
  2. SHPALLOC(3F)                                                   SHPALLOC(3F)
  3.  
  4.  
  5. NNNNAAAAMMMMEEEE
  6.      SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC - Allocates a block of memory from the symmetric heap
  7.  
  8. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  9.      PPPPOOOOIIIINNNNTTTTEEEERRRR ((((_a_d_d_r,,,, AAAA((((1111))))))))
  10.      IIIINNNNTTTTEEEEGGGGEEEERRRR ((((_l_e_n_g_t_h,,,, _e_r_r_c_o_d_e,,,, _a_b_o_r_t))))
  11.      CCCCAAAALLLLLLLL SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC((((_a_d_d_r,,,, _l_e_n_g_t_h,,,, _e_r_r_c_o_d_e,,,, _a_b_o_r_t))))
  12.  
  13. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  14.      SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC allocates a block of memory from the program's symmetric heap
  15.      that is greater than or equal to the size requested.  If the request
  16.      cannot be satisfied from the free blocks currently in the heap, it
  17.      will try to allocate more memory from the system.  To maintain
  18.      symmetric heap consistency, all PEs in an program must call SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC
  19.      with the same value of _l_e_n_g_t_h; if any processing elements (PEs) are
  20.      missing, the program will hang.
  21.  
  22.      The SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC function accepts the following arguments:
  23.  
  24.      AAAArrrrgggguuuummmmeeeennnntttt       DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  25.      _a_d_d_r           First word address of the allocated block (output).
  26.      _l_e_n_g_t_h         Number of words of memory requested (input).  One word
  27.                     is 32 bits.
  28.      _e_r_r_c_o_d_e        Error code is 0 if no error was detected; otherwise, it
  29.                     is a negative integer code for the type of error
  30.                     (output).
  31.      _a_b_o_r_t          Abort code; nonzero requests abort on error; 0 requests
  32.                     an error code (input).
  33.  
  34.      By using the Fortran PPPPOOOOIIIINNNNTTTTEEEERRRR mechanism in the following manner, you
  35.      can use array AAAA to refer to the block allocated by SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC:
  36.  
  37.           POINTER (addr, A(1))
  38.  
  39. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
  40.      Error conditions are as follows:
  41.  
  42.      EEEErrrrrrrroooorrrr CCCCooooddddeeee     CCCCoooonnnnddddiiiittttiiiioooonnnn
  43.            ----1111       Length is not an integer greater than 0.
  44.            ----2222       No more memory is available from the system (checked if
  45.                     the request cannot be satisfied from the available
  46.                     blocks on the symmetric heap).
  47.  
  48. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  49.      iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3), sssshhhhmmmmaaaalllllllloooocccc(3F), sssshhhhppppccccllllmmmmoooovvvveeee(3F), sssshhhhppppddddeeeeaaaallllllllcccc(3F)
  50.