Ada 编程/库/System.Storage_Pools
外观
此语言功能从 Ada 95 开始提供。
System.Storage_Pools 是 预定义语言环境 的一个单元,自 Ada 95 开始提供。
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <[email protected]> -- 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 -- -------------------------------------------------------------------------with
Ada.Finalization;with
System.Storage_Elements;package
System.Storage_Poolsis
pragma
Preelaborate (System.Storage_Pools);type
Root_Storage_Poolis
abstract
new
Ada.Finalization.Limited_Controlledwith
private
;pragma
Preelaborable_Initialization (Root_Storage_Pool);procedure
Allocate (Pool :in
out
Root_Storage_Pool; Storage_Address :out
Address; Size_In_Storage_Elements :in
Storage_Elements.Storage_Count; Alignment :in
Storage_Elements.Storage_Count)is
abstract
;procedure
Deallocate (Pool :in
out
Root_Storage_Pool; Storage_Address :in
Address; Size_In_Storage_Elements :in
Storage_Elements.Storage_Count; Alignment :in
Storage_Elements.Storage_Count)is
abstract
;function
Storage_Size (Pool : Root_Storage_Pool)return
Storage_Elements.Storage_Countis
abstract
;private
pragma
Import (Ada, Root_Storage_Pool);end
System.Storage_Pools;
外部示例
[编辑源代码]- 在以下网站搜索 示例:Rosetta Code,GitHub (gists),任何 Alire 包 或 本维基教科书。
- 在以下网站搜索 帖子:Stack Overflow,comp.lang.ada 或 任何 Ada 相关页面。
FSF GNAT
- 规范: s-stopoo.ads
- 主体: s-stopoo.adb
drake
- 规范: s-stopoo.ads
- 主体: s-stopoo.adb