COMPILATION LISTING OF SEGMENT buddy_area_assign_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 0959.0 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 /* buddy_area_assign_ assigns one area to another if possible. If the sending area has no more allocated in it than 14* can be held by the receiver, the assignment is successful. If there is not enough room in the receiver, 15* the area condition is signaled. The state of the receiver after an unsuccessful assignment 16* is unpredictable. 17* usage, dcl buddy_area_assign_ ext entry(ptr,ptr), call buddy_area_assign_(receivingptr,sendingptr), 18* the area pointed to by "receivingptr" is made equal to the area pointed to by "sendingptr". note, 19* equal means that what was allocated in one area is allocated at the same offset in the other, it does not 20* mean that the areas have the same total size. 21* coded on 12.26.72 by A. Downing */ 22 23 buddy_area_assign_: proc (area_ptr, send_ptr); 24 dcl send_ptr ptr, 25 (null, rel, fixed) builtin, 26 buddy_area_$buddy_redef ext entry (fixed bin (26), ptr), 27 save_size fixed bin (26), 28 image1 (receiver_size) based bit (36) aligned, 29 receiver_size fixed bin (26), 30 image2 (send_size) based bit (36) aligned, 31 send_size fixed bin (26), 32 area condition, 33 sys_info$max_seg_size ext static fixed bin (26); 1 1 /* area_header_v2pl1.incl.pl1 */ 1 2 dcl area_header (23) fixed bin (26) aligned based (area_ptr), 1 3 /* the first two words are 0 so that the area can be identified as of the new style, 1 4* the third word contains the size of the area in words, 1 5* the fourth word is the high water mark, 1 6* the fifth word is the first usable word in the area, 1 7* the sixth word is the stratum word number corresponding to the largest possible block in this area, 1 8* words 7 through 23 are stratum words which point to blocks which are free 1 9* and whose size is 2**2 through 2**18 */ 1 10 area_ptr ptr; /* points to the area */ 1 11 dcl exp_tbl (0:18) fixed bin (26) int static init 1 12 (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144); 1 13 dcl front fixed bin (26); 34 35 36 on condition (area) go to error_return; /* can not make the desired area assignment */ 37 38 save_size, receiver_size = area_ptr -> area_header (3); 39 if receiver_size + fixed (rel (area_ptr), 18) > sys_info$max_seg_size then 40 receiver_size = receiver_size - 24; 41 if send_ptr -> area_header (4) < area_ptr -> area_header (3) then 42 send_size = send_ptr -> area_header (4); 43 else do; 44 if area_ptr -> area_header (3) > send_ptr -> area_header (3) then 45 send_size = send_ptr -> area_header (3); 46 else send_size = area_ptr -> area_header (3); 47 end; 48 if send_size + fixed (rel (send_ptr), 18) > sys_info$max_seg_size then 49 send_size = send_size - 24; 50 if receiver_size < send_size then area_ptr -> image1 = send_ptr -> image1; 51 else area_ptr -> image2 = send_ptr -> image2; 52 call buddy_area_$buddy_redef (save_size, area_ptr); 53 return; 54 error_return: 55 revert area; /* must do this so that the user thinks that the signal originated from buddy_area_assign_ */ 56 signal area; 57 return; 58 end buddy_area_assign_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0804.7 buddy_area_assign_.pl1 >spec>install>1110>buddy_area_assign_.pl1 34 1 05/06/74 1740.3 area_header_v2pl1.incl.pl1 >ldd>include>area_header_v2pl1.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. area 000104 stack reference condition dcl 24 ref 36 54 56 area_header based fixed bin(26,0) array dcl 1-2 ref 38 41 41 41 44 44 44 46 area_ptr parameter pointer dcl 1-2 set ref 23 38 39 41 44 46 50 51 52* buddy_area_$buddy_redef 000010 constant entry external dcl 24 ref 52 fixed builtin function dcl 24 ref 39 48 image1 based bit(36) array dcl 24 set ref 50* 50 image2 based bit(36) array dcl 24 set ref 51* 51 receiver_size 000101 automatic fixed bin(26,0) dcl 24 set ref 38* 39 39* 39 50 50 rel builtin function dcl 24 ref 39 48 save_size 000100 automatic fixed bin(26,0) dcl 24 set ref 38* 52* send_ptr parameter pointer dcl 24 ref 23 41 41 44 44 48 50 51 send_size 000102 automatic fixed bin(26,0) dcl 24 set ref 41* 44* 46* 48 48* 48 50 51 sys_info$max_seg_size 000012 external static fixed bin(26,0) dcl 24 ref 39 48 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. exp_tbl internal static fixed bin(26,0) initial array dcl 1-11 front automatic fixed bin(26,0) dcl 1-13 null builtin function dcl 24 NAMES DECLARED BY EXPLICIT CONTEXT. buddy_area_assign_ 000006 constant entry external dcl 23 error_return 000123 constant label dcl 54 ref 36 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 206 222 130 216 Length 412 130 14 153 56 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME buddy_area_assign_ 82 external procedure is an external procedure. on unit on line 36 64 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME buddy_area_assign_ 000100 save_size buddy_area_assign_ 000101 receiver_size buddy_area_assign_ 000102 send_size buddy_area_assign_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac tra_ext_1 signal_op enable_op ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. buddy_area_$buddy_redef THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 23 000002 36 000013 38 000032 39 000040 41 000050 44 000057 46 000065 48 000066 50 000075 51 000105 52 000112 53 000122 54 000123 56 000124 57 000127 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved