PL/SQL Program Units即PL/SQL程序单元,常被叫做"library units"或lib-units. 参考以下模块类型:

  • package spec
  • package body
  • top-level function or procedure
  • type spec
  • type body
  • trigger
  • anonymous blocks.

PL/SQL 虚拟机的内存使用主要体现在4个方面:

  • PGA

    • PL/SQL stack call,用于保存本地变量和其他一些状态结构
    • NCOMP生成的动态链接库文件
  • CGA
    • 二级内存(secondary memory),分配的堆和大的可收缩本地变量如大的strings、Lob或collections
  • UGA
    • 程度单元的实例(library-unit instantiations),如package global variables, DL0/ DL1 dependency vectors, display frame等
  • SGA 共享池中的MCODE子堆

KGL - Kernel Generic Library Manager 该layer管理会话间需要共享的资源,如PL/SQL MCODE,Diana,Source,SQL cursor,SQL Plan) KGI - Kernel Generic Instantiation Layer. 该layer管理特定会话非共享的资源,如实例化的包含了包全局变量状态信息的PL/SQL程序单元 KOH/KGH 该layer用以管理heap service堆服务   PLSQL MCODE Heap的属性

  • machine dependent binary format for a compiled PL/SQL library-unit.
  • to execute code in a lib-unit, its MCODE heap must be loaded in memory.
  • MCODE is loaded in SGA and is “pinned” for CALL duration.
  • once unpinned, the heap may be aged; hence, may need to get re-loaded.
  • important to page large data structures in SGA.

MCODE Heap: Subcomponents

  • EntryPoint Piece (PL_UEP)
  • Code Segment or Byte Code Piece (PL_UCP)
  • Constant Pool:
    • Data Segment (PL_UKP)
    • Handle Segment (PL_UHS)
  • SQL Strings Table (PL_USP)

PL/SQL Instantiations

  • When a lib-unit is first referenced by a program (session) an instantiation of the lib unit is created.
  • PL/SQL relies on KGI for inst obj mgmt.
  • A PL/SQL lib-unit instantiation consists of:
    • PLIO struct (the handle of the PL/SQL inst obj)
    • Static Frame
    • Secondary (Heap) Memory for package globals
  • PLIO Struct
    • first portion of PLIO struct is the KGIOB struct (kgi’s portion of the object handle)
    • points to the static frame struct (PLIOST)
    • also contains other book-keeping info (such as memory duration of instantiation’s work area, etc.)
  • Static Frame:
    • represents that part of instantiation’s work area whose size is compile-time determined.
    • the root of the static frame is PLIOST struct which leads the following sub-pieces:
      • depends-on array to global variable vectors (DL0)
      • depends-on array to other instantiations (DL1)
      • Display Frame (DPF)
      • global variable vector for this unit (GF)
      • primary memory for global variables.
  • Secondary Memory for package globals
    • used to allocate data types that are stored out-of-line (heap allocated)e.g., collections, large strings, large records, LOBs, datetime types, etc.

转载于:https://blog.51cto.com/maclean/1277854

PL/SQL Virtual Machine Memory Usage相关推荐

  1. Oracle11g x64使用Oracle SQL Developer报错:Unable to find a Java Virtual Machine

    1.环境 win10 64位,oracle 11g r2,jdk8 64位 2.问题 第一次启动Oracle SQL Developer的时候会让我们填写java.exe的路径,jdk有两种: 我自己 ...

  2. Virtual Machine Manager 2012 R2利用服务模板部署SQL

    在Virtual Machine Manager中,我们可以通过创建服务来进行一个或是一组的虚拟机服务配置,包括SQL服务.Sharepoint,甚至可以通过服务部署一个Exchange等.结合自助服 ...

  3. fixed:Not enough physical memory is available to power on this virtual machine with its configured

    解决升级到MacOS Big Sur无法打开虚拟机 故障背景 升级到MacOS Big Sur后无法打开虚拟机 解决方案 升级VMWare Fusion 11 到12 故障背景 升级到MacOS Bi ...

  4. System Center Virtual Machine Manager 2012 安装

    System Center Virtual Machine Manager 2012 安装 System Center 2012 云和数据中心管理解决方案为您提供了针对私有云和公共云应用程序和服务的常 ...

  5. ORACLE甚而,PL/SQL基础

    Oracle PL/SQL语言基础 PL/SQL是ORACLE对标准数据库语言的扩展,ORACLE公司已经将PL/SQL整合到ORACLE 服务器和其他工具中了,近几年中更多的开发人员和DBA开始使用 ...

  6. Understanding memory usage on Linux

    2019独角兽企业重金招聘Python工程师标准>>> This entry is for those people who have ever wondered, "Wh ...

  7. 关注各种高级语言虚拟机(high-level language virtual machine,HLL VM)的设计与实现,泛化至各种高级语言的运行时的设计与实现,也会涉及动态编译、GC、动态语言的编

    关注各种高级语言虚拟机(high-level language virtual machine,HLL VM)的设计与实现,泛化至各种高级语言的运行时的设计与实现,也会涉及动态编译.GC.动态语言的编 ...

  8. The HipHop Virtual Machine

    目前Facebook已将该HipHop虚拟机开源,源代码发布在GitHub上.关于该工具的技术原理在Facebook的开发者页面上有一篇详细的文章介绍,查看这里. 如果看不到的可以看下面的转载: We ...

  9. [New Portal]Windows Azure Virtual Machine (5) 配置VM的Endpoints

    <Windows Azure Platform 系列文章目录> 首先我们回顾前几章介绍的内容: 1.首先我们新建了预装了SQL Server 2012的Virtual Machine 2. ...

最新文章

  1. VC下通过进程ID获取进程镜像文件路径的方法及其存在的缺陷
  2. 点击鼠标左键 自动锁定计算机图标,鼠标一按左键桌面图标就消失了怎么办_为什么按鼠标左键时桌面图标都不见了...
  3. 【GitLab】与idea的搭配
  4. what's the difference between atime, ctime and mtime
  5. 4月8日及以后火车票暂停发售!
  6. Online Judge系统常见返回信息分析
  7. Java多线程编程—锁优化
  8. 软件设计之UML的几种关系
  9. 数学图形(2.1)三叶结
  10. [工具] Numpy
  11. 三菱MDS-D-SVJ3-10/20/10NA/20NA伺服驱动器
  12. [ 读书笔记 ] 1 -《 程序员修炼之道 - 通向务实的最高境界 (第2版)》
  13. Python Selenium IE 上传文件和 处理网页对话框showModalDailog模态对话框
  14. DDD领域建模基本流程
  15. 关系型数据库和主键外键
  16. python读写excel文件(xls格式)
  17. cms,crm名词解释
  18. flash player官网地址 建议不要下载flash.cn的
  19. 一次百度网盘的悲惨经历
  20. 使用极光推送发送短信验证码

热门文章

  1. 【转】C#播放H264裸码流
  2. 《深入理解mybatis原理》 MyBatis的一级缓存实现详解 及使用注意事项
  3. 1 创建数据库连接对象 IDbConnection
  4. UML关系(泛化,实现,依赖,关联(聚合,组合))
  5. 【洛谷 1991】 无线通讯网
  6. Knockout应用开发指南 第八章:简单应用举例(1)
  7. 无节操cocos2d-js游戏
  8. Silverlight实用窍门系列:35.细解Silverlight冒泡路由事件和注册冒泡路由事件【附带实例源码】...
  9. LR(0)语法制导翻译
  10. apache php wordpress,windows 安装 apache php wordpress