| 
									
										
										
										
											2013-12-10 16:14:06 +00:00
										 |  |  | --------------------------------------------------------------------
 | 
					
						
							|  |  |  | -- Instantantiate this package before using. To allocate integers,
 | 
					
						
							|  |  |  | --
 | 
					
						
							|  |  |  | --   package Integer_Pool is new Pool (Integer, Integer_Pointer, Storage_Pool);
 | 
					
						
							|  |  |  | --
 | 
					
						
							|  |  |  | --   Integer_Pool.Allocate (10);
 | 
					
						
							|  |  |  | --------------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | generic | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 	--type Normal_Type is private;
 | 
					
						
							|  |  |  | 	type Normal_Type is limited private; | 
					
						
							|  |  |  | 	type Pointer_Type is access all Normal_Type; | 
					
						
							| 
									
										
										
										
											2013-12-10 16:14:06 +00:00
										 |  |  | 	Storage_Pool: in Storage_Pool_Pointer := null; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | package H2.Pool is | 
					
						
							| 
									
										
										
										
											2014-06-17 15:23:35 +00:00
										 |  |  | 	--pragma Preelaborate (Pool);
 | 
					
						
							| 
									
										
										
										
											2013-12-10 16:14:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	function Allocate (Pool: in Storage_Pool_Pointer := null) return Pointer_Type; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | --	function Allocate (Source: in Normal_Type; 
 | 
					
						
							|  |  |  | --	                   Pool:   in Storage_Pool_Pointer := null) return Pointer_Type;
 | 
					
						
							| 
									
										
										
										
											2013-12-10 16:14:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	procedure Deallocate (Target: in out Pointer_Type; | 
					
						
							|  |  |  | 	                      Pool:   in     Storage_Pool_Pointer := null); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | end H2.Pool; | 
					
						
							|  |  |  | 
 |