1 04/21/82 get_temp_segment_
2
3
4 Entry points in get_temp_segment_:
5 List is generated by the help command
6
7
8 :Entry: get_temp_segment_: 09/25/86 get_temp_segment_
9
10
11 Function: acquires a temporary segment in the process directory. The
12 segment returned to the caller is zero-length.
13
14 A free pool of temporary segments is associated with each user process.
15 The pool concept makes it possible to use the same temporary segment
16 more than once during the life of a process. Reusing temporary
17 segments in this way avoids the cost of creating a segment each time
18 one is needed.
19
20 If more than one temporary segment is required, use the
21 get_temp_segments_ subroutine.
22
23
24 Syntax:
25 declare get_temp_segment_ entry char* ptr fixed bin35;
26 call get_temp_segment_ program temp_seg_ptr code;
27
28
29 Arguments:
30 program
31 is a 32-character field identifying the program on whose behalf the
32 temporary segment is to be used. This field is displayed by the
33 list_temp_segments command. Besides giving the name of the command
34 or subroutine invoked by the user, it can also briefly describe how
35 the temporary segment is used; for example, "sort_seg sort
36 indexes." Input
37 temp_seg_ptr
38 is a returned pointer to the requested temporary segment. Output
39 code
40 is a standard status code. Output
41
42
43 Notes: This subroutine assigns a temporary segment to its caller. It
44 creates a new temporary segment and adds it to the free pool if one is
45 not currently available to satisfy the request. The temporary segment
46 is created in the process directory with a unique name including the
47 temp.xxxx suffix, where xxxx is the segment number of the segment in
48 octal. See the description of the release_temp_segment_ or the
49 release_temp_segments_ subroutine for a description of how to return a
50 temporary segment to the free pool.
51
52 The list_temp_segments command described in the MPM Commands can be
53 used to list the temporary segments being used by a process.