Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / subAlloc
1 ;
2 ; suballoc.sh
3 ;
4 ; Handling of requests for small link blocks
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sapphire library.
12 ;
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
16 ; any later version.
17 ;
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ; sub_alloc
32 ; sub_free
33 ; sub_init
34
35 [ :LNOT::DEF:suballoc__dfn
36 GBLL suballoc__dfn
37
38 ; --- sub_alloc ---
39 ;
40 ; On entry: R0 == size of block to allocate
41 ;
42 ; On exit: R0 == pointer to block allocated
43 ; May return an error
44 ;
45 ; Use: Allocates a block of the size specified, typically very
46 ; quickly indeed.
47 ;
48 ; If the size is not one of those supported (currently
49 ; supported sizes are 8-40 inclusive in 4 byte increments),
50 ; the behaviour is undefined (but very predictable).
51
52 IMPORT sub_alloc
53
54 ; --- sub_free ---
55 ;
56 ; On entry: R0 == pointer to block
57 ; R1 == size of the block
58 ;
59 ; On exit: --
60 ;
61 ; Use: Frees a block allocated using sub_alloc.
62
63 IMPORT sub_free
64
65 ; --- sub_init ---
66 ;
67 ; On entry: --
68 ;
69 ; On exit: --
70 ;
71 ; Use: Initialises the suballocation system for use.
72
73 IMPORT sub_init
74
75 ]
76
77 ;----- That's all, folks ----------------------------------------------------
78
79 END