Ada 编程/库/System.Storage_Pools.Subpools
外观
此语言特性在 Ada 2012 中引入。
系统.Storage_Pools.Subpools 是 预定义语言环境 自 Ada 2012 以来的一部分。
-- Standard Ada library specification -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------package
System.Storage_Pools.Subpoolsis
pragma
Preelaborate (Subpools);type
Root_Storage_Pool_With_Subpoolsis
abstract
new
Root_Storage_Poolwith
private
;type
Root_Subpoolis
abstract
tagged
limited
private
;type
Subpool_Handleis
access
all
Root_Subpool'Class;for
Subpool_Handle'Storage_Sizeuse
0;function
Create_Subpool (Pool :in
out
Root_Storage_Pool_With_Subpools)return
not
null
Subpool_Handleis
abstract
; -- The following operations are intended for pool implementers:function
Pool_of_Subpool (Subpool :not
null
Subpool_Handle)return
access
Root_Storage_Pool_With_Subpools'Class;procedure
Set_Pool_of_Subpool ( Subpool :in
not
null
Subpool_Handle; To :in
out
Root_Storage_Pool_With_Subpools'Class);procedure
Allocate_From_Subpool ( Pool :in
out
Root_Storage_Pool_With_Subpools; Storage_Address :out
Address; Size_In_Storage_Elements :in
Storage_Elements.Storage_Count; Alignment :in
Storage_Elements.Storage_Count; Subpool :in
not
null
Subpool_Handle)is
abstract
with
Pre => 'Class => Pool_of_Subpool(Subpool) = Pool'Access;procedure
Deallocate_Subpool ( Pool :in
out
Root_Storage_Pool_With_Subpools; Subpool :in
out
Subpool_Handle)is
abstract
with
Pre => 'Class => Pool_of_Subpool(Subpool) = Pool'Access;function
Default_Subpool_for_Pool ( Pool :in
out
Root_Storage_Pool_With_Subpools)return
not
null
Subpool_Handle;overriding
procedure
Allocate ( Pool :in
out
Root_Storage_Pool_With_Subpools; Storage_Address :out
Address; Size_In_Storage_Elements :in
Storage_Elements.Storage_Count; Alignment :in
Storage_Elements.Storage_Count);overriding
procedure
Deallocate ( Pool :in
out
Root_Storage_Pool_With_Subpools; Storage_Address :in
Address; Size_In_Storage_Elements :in
Storage_Elements.Storage_Count; Alignment :in
Storage_Elements.Storage_Count)is
null
;overriding
function
Storage_Size (Pool : Root_Storage_Pool_With_Subpools)return
Storage_Elements.Storage_Countis
(Storage_Elements.Storage_Count'Last);private
-- not specified by the languageend
System.Storage_Pools.Subpools;
外部示例
[编辑源代码]- 在以下网站搜索 示例
System.Storage_Pools.Subpools
:Rosetta Code,GitHub (gists),任何 Alire 包 或者 本维基教科书。 - 在以下网站搜索与
System.Storage_Pools.Subpools
相关的 帖子:Stack Overflow,comp.lang.ada 或者 任何与 Ada 相关的页面。
FSF GNAT
- 规范:s-stposu.ads
- 主体:s-stposu.adb
drake
- 规范:s-stposu.ads
- 主体:s-stposu.adb