Java 应用与开发 - Java 内存模型与分配机制Java 内存模型 Java 程序内存运行分析 Java 内存管理建议 JVM 内存溢出和参数调优 当遇到 OutOfMemoryError 时该如何做? ▶ 常见的 OOM(Out Of Memory)内存溢出异常,就是堆内 存空间不足以存放新对象实例时导致。 ▶ 永久区内存溢出相对少见,一般是由于需要加载海量的 Class 数据,超过了非堆内存的容量导致。 ▶ 栈内存也会溢出,但是更加少见。 Java 内存模型 Java 程序内存运行分析 Java 内存管理建议 JVM 内存溢出和参数调优 当遇到 OutOfMemoryError 时该如何做? ▶ 常见的 OOM(Out Of Memory)内存溢出异常,就是堆内 存空间不足以存放新对象实例时导致。 ▶ 永久区内存溢出相对少见,一般是由于需要加载海量的 Class 数据,超过了非堆内存的容量导致。 ▶ 栈内存也会溢出,但是更加少见。 Java 内存模型 Java 程序内存运行分析 Java 内存管理建议 JVM 内存溢出和参数调优 当遇到 OutOfMemoryError 时该如何做? ▶ 常见的 OOM(Out Of Memory)内存溢出异常,就是堆内 存空间不足以存放新对象实例时导致。 ▶ 永久区内存溢出相对少见,一般是由于需要加载海量的 Class 数据,超过了非堆内存的容量导致。 ▶ 栈内存也会溢出,但是更加少见。0 码力 | 44 页 | 818.30 KB | 1 年前3
JVM 内存模型0 码力 | 1 页 | 48.42 KB | 1 年前3
Comprehensive Rust(简体中文) 202412的宏只是 部分卫生。 • Rust 是多范式编程语言。例如,它具有强大的面向对象的编程功能,虽然它不是函数式语言,但包括 一系列的函数概念。 5.2 变量 Rust provides type safety via static typing. Variable bindings are made with let: fn main() { let x: i32 = 10; println!("x: outside that block. • Shadowing is different from mutation, because after shadowing both variable's memory locations exist at the same time. Both are available under the same name, depending where you use question about modifying a[3] can spark an interesting discussion, but the answer is that for memory safety reasons you cannot do it through a at this point in the execution, but you can read the data from0 码力 | 359 页 | 1.33 MB | 10 月前3
基于静态分析的Rust内存安全缺陷检测研究Unsafe APIs and FFIs call User Programs call call Safe Rust Unsafe Rust Safe API access Memory Unsafe APIs Unsafe API call Unsafe API access call Rust实际表现如何? ❑ 调研了2020年12月31日前报告的185个内存安全漏洞[TOSEM'21] [TOSEM'21] “Memory-safety challenge considered solved? An in-depth study with all Rust CVEs”, TOSEM, 2021. PoC #![forbid(unsafe_code)] Libraries unsafe code call safe (unsound) APIs Unsound Mem-Safety Problem Automatic Memory Reclaim ❑ Unsound Function ❑ Unsound Generic or Trait Auto Memory Reclaim问题:示例1 创建一个临时字符串s 通过unsafe将v指向临时内存 返回v 自动析构s,造成悬空指针v 访问v造成use-after-free 从Rust MIR分析Auto Memory Reclaim问题0 码力 | 28 页 | 1.55 MB | 1 年前3
使用硬件加速Tokio - 戴翔Fly.io, and Embark), even it has paid contributors! Tokio is good enough Tokio Tokio's APIs are memory-safe, thread-safe, and misuse-resistant. This helps prevent common bugs, such as unbounded queues Software Enqueue Software Producer Consumer Consumer Consumer • Synchronization latency • Memory/Cache latency • CPU cycles latency DLB : Dynamic Load Balance DLB Enqueue Logic Head and Tail Load Balancer Producer Producer Consumer Consumer Consumer • No Synchronization latency • No memory/cache latency • No CPU cycles DLB-Assist Channel Intro Hardware Senders Receive Senders Senders0 码力 | 17 页 | 1.66 MB | 1 年前3
百度超级链 XuperChain latest 中文文档超级链共识矩阵 10.4. 超级链共识主流程 10.5. 接口介绍 11. Chained-BFT共识公共组件 11.1. 概述 11.2. 核心数据结构 11.3. Smr 11.4. Safety Rule 11.5. PacemakerInterface 12. XPoS共识 12.1. 介绍 13. XPoA共识 13.1. 介绍 13.2. 技术细节 13.3. 整体代码 wasm_rt_malloc)(user_ctx, sizeof(wasm_rt_handle_t)); (h->user_ctx) = user_ctx; init_globals(h); init_memory(h); init_table(h); return h; } 3.4. 语言运行环境 3.4.1. c++运行环境 c++因为没有runtime,因此运行环境相对比较简单,只需要设置基础的堆栈分 举例如下: 1 2 3 4 5 6 7 8 { "kvstore":[ { "subtype": "Memory", "path": "plugins/kv-memory.so.1.0.1", "version": "1.0.1", "ondemand": false0 码力 | 316 页 | 24.51 MB | 1 年前3
百度超级链 XuperChain master 中文文档超级链共识矩阵 10.4. 超级链共识主流程 10.5. 接口介绍 11. Chained-BFT共识公共组件 11.1. 概述 11.2. 核心数据结构 11.3. Smr 11.4. Safety Rule 11.5. PacemakerInterface 12. XPoS共识 12.1. 介绍 13. XPoA共识 13.1. 介绍 13.2. 技术细节 13.3. 整体代码 wasm_rt_malloc)(user_ctx, sizeof(wasm_rt_handle_t)); (h->user_ctx) = user_ctx; init_globals(h); init_memory(h); init_table(h); return h; } 3.4. 语言运行环境 3.4.1. c++运行环境 c++因为没有runtime,因此运行环境相对比较简单,只需要设置基础的堆栈分 举例如下: 1 2 3 4 5 6 7 8 { "kvstore":[ { "subtype": "Memory", "path": "plugins/kv-memory.so.1.0.1", "version": "1.0.1", "ondemand": false0 码力 | 316 页 | 24.51 MB | 1 年前3
百度超级链 XuperChain stable 中文文档10.4. XuperChain 共识主流程 10.5. 接口介绍 11. Chained-BFT共识公共组件 11.1. 概述 11.2. 核心数据结构 11.3. Smr 11.4. Safety Rule 11.5. PacemakerInterface 12. XPoS共识 12.1. 介绍 13. XPoA共识 13.1. 介绍 13.2. 技术细节 13.3. 整体代码 sizeof(wasm_rt_handle_t)); 11 (h->user_ctx) = user_ctx; 12 init_globals(h); 13 init_memory(h); 14 init_table(h); 15 return h; 16 } 3.4. 语言运行环境 3.4.1. c++运行环境 c++因为没有runtime,因此运 址。 举例如下: 1 { 2 "kvstore":[ 3 { 4 "subtype": "Memory", 5 "path": "plugins/kv-memory.so.1.0.1", 6 "version": "1.0.1", 7 "ondemand": false0 码力 | 325 页 | 26.31 MB | 1 年前3
百度超级链 XuperChain 3.12-a中文文档imageName: "docker.io/centos:7.5.1804" # cpu核数限制,可以为小数 cpus: 1 # 内存大小限制 memory: "1G" 编译合约 JAVA C++ GO Solidity Python 在命令行执行: 合约部署 git clone https://github.com/xuperchain/contract-sdk-java 在其内部加载的代 码和数据的机密性与完整性。 SGX:Software Guard Extensions(SGX)是Intel推出的基于Intel CPU的硬件安 全机制。 Mesatee:Memory Safe TEE(Mesatee)是百度基于Intel SGX设计的内存安全的 可信安全计算服务框架。 架构设计 下图是可信账本的系统架构设计 TEESDK是与TEE服务请求的入口,将编译为动态链接库被超级链调用,实 "docker.io/centos:7.5.1804" # cpu核数限制,可以为小数 cpus: 1 16 17 # 内存大小限制 memory: "1G" 接下来 C++合约 Go合约 Java合约 Solidity合约 C++合约 预备知识 XuperChain 基本操作 注解 请先完成 XuperChain 基本操作0 码力 | 336 页 | 12.62 MB | 1 年前3
百度超级链 XuperChain 3.12-c 中文文档imageName: "docker.io/centos:7.5.1804" # cpu核数限制,可以为小数 cpus: 1 # 内存大小限制 memory: "1G" 编译合约 JAVA C++ GO Solidity Python 在命令行执行: 合约部署 git clone https://github.com/xuperchain/contract-sdk-java 在其内部加载的代 码和数据的机密性与完整性。 SGX:Software Guard Extensions(SGX)是Intel推出的基于Intel CPU的硬件安 全机制。 Mesatee:Memory Safe TEE(Mesatee)是百度基于Intel SGX设计的内存安全的 可信安全计算服务框架。 架构设计 下图是可信账本的系统架构设计 TEESDK是与TEE服务请求的入口,将编译为动态链接库被超级链调用,实 "docker.io/centos:7.5.1804" # cpu核数限制,可以为小数 cpus: 1 16 17 # 内存大小限制 memory: "1G" 接下来 C++合约 Go合约 Java合约 Solidity合约 C++合约 预备知识 XuperChain 基本操作 注解 请先完成 XuperChain 基本操作0 码力 | 336 页 | 12.62 MB | 1 年前3
共 572 条
- 1
- 2
- 3
- 4
- 5
- 6
- 58













