SlideShare a Scribd company logo
1 of 51
Download to read offline
Valentin Simonov
Field Engineer
Unity Technologies
val@unity3d.com
valyard
Understanding Memory on iOS
• Partly applicable to other platforms
• But needs testing
No need to take pictures
Detailed doc at the end*
* yes, you will have to sit through the entire presentation
How much memory does my game take?
- How much memory does my game take?
- What kind of memory?
• Physical/Resident Memory
• Graphics Memory
• Virtual Memory
• Malloc Heap
• Dirty Memory
• Native Memory
• Mono Heap
Physical Memory (RAM)
• The total amount of memory on-chip
• You can’t have more*
* But Android users can... until it is mysteriously gone
Physical Memory
Virtual Memory (VM)
• iOS apps don’t work with Physical Memory directly, they work with Virtual Memory
• App’s private address space
• Divided into Pages (4KB or 16KB)
• Pages are mapped to Physical Memory by the OS
PhysicalMemory
Allocated Virtual Memory
AvailableAddressSpace
Resident Memory
• An app can allocate a block of memory in Virtual Memory but not use it (”reserve”)
• The app has to modify the allocated VM for the OS to map it to PM (”commit”)
• Resident Memory is the total amount of Physical Memory used by the app at any moment
PhysicalMemory
Resident Memory
AvailableAddressSpace
reserved (not part of RM) committed (part of RM)
Clean Memory and Dirty Memory
• Clean Memory — read-only pages of Resident Memory which iOS can remove and reload
• Dirty Memory — everything else in Resident Memory
• Apps can share Clean Memory pages (like, system frameworks)
PhysicalMemory
AvailableAddressSpace
Clean
Dirty
Clean Memory and Dirty Memory
• Memory allocated for the following data is Clean (iOS can reload this from disk):
• App’s binaries, static code segments,
• memory-mapped files,
• System frameworks and dynamic libraries, etc.
PhysicalMemory
AvailableAddressSpace
Binaries
Dirty
Graphics Memory (VRAM)
• iOS uses a Unified Memory Architecture — GPU and CPU share Physical Memory
• Graphics Driver allocates Virtual Memory for its resources
• Most of this is Resident and Dirty
PhysicalMemory
AvailableAddressSpace
Graphics Memory
Binaries
Dirty
Malloc Heap
• A region of VM where the app can allocate memory using malloc and calloc functions
• This is where Unity allocates all memory for its needs
• The maximum size is unknown, but seems to be 2x Physical Memory
PhysicalMemory
Malloc Heap
AvailableAddressSpace
Graphics Memory
Binaries
Swapped (compressed) Memory
• iOS doesn’t have a page file and can’t dump rarely used Virtual Memory pages to disk
• But it can compress them and store in some other region of Physical Memory
• SCM is a compressed part of the app’s Dirty Memory
• The algorithm is unknown, but iOS usually tries to compress as much as it can
PhysicalMemory
Clean
Not Compressed
Dirty Memory
Compressed
Dirty Memory
Native (Unity) Memory
• Unity is a C++ engine with a .NET Virtual Machine
• Native Memory — part of Malloc Heap (VM Region) used for all Unity’s allocations
• All asset data is in Native Memory, exposed to C# as lightweight wrappers
PhysicalMemory
AvailableAddressSpace
Native Memory
Graphics Memory
Binaries
Native Plugins
• Native plugins do their own allocations in Malloc Heap
• Their code binaries are “Clean”
PhysicalMemory
AvailableAddressSpace
Native Memory
Graphics Memory
Binaries
Native
Plugins
Mono Heap
• A part of Native Memory allocated for the needs of the .NET Virtual Machine
• Contains all managed C# allocations, maintained by Garbage Collector
PhysicalMemory
AvailableAddressSpace
Native Memory
Graphics Memory
Binaries
Native
Plugins
Mono
Heap
Mono Heap
Native Memory
Managed Objects
Unused Mono Heap
ImaginationReality
• Mono Heap is not a large contiguous region of Native Memory
• It is allocated in blocks to store objects of similar size
• There can be allocated, committed but unused blocks
• If a block is still unused after 8 Garbage Collection passes,
its Physical Memory will be returned to the system (decommitted)
Block
Block
Almost empty block
Block
Allocated but unused block
Allocated but unused block
iOS Memory Management
• iOS is a multitasking OS
• Each app works with its own Virtual Memory address space mapped to Physical Memory
iOS Memory Management
• When the amount of free Physical Memory gets low,
iOS starts trying to reduce memory pressure:
1. Removes Clean Memory pages (they can be safely reloaded later)
2. If the app takes too much Dirty Memory, iOS sends memory warnings
3. If the app fails to free resources, iOS terminates it
• We don’t know the details about this algorithm
• Sometimes an app can allocate more, sometimes less
Minimize the Size of Dirty Memory!
• Measure the app’s Dirty Memory and see if it grows over time,
• Reduce the amount of objects contributing to Dirty Memory,
• Note: some data can be compressed better.
PhysicalMemory
AvailableAddressSpace
Native Memory
Graphics Memory
Binaries
Native
Plugins
Mono
Heap
Dirty Memory
Minimize the Size of Dirty Memory!
• Reasonable limits of Dirty Memory:
• 180Mb for 512Mb devices,
• 360Mb for 1Gb devices,
• 1.2Gb for 2Gb devices.
• ... but, iOS can still kill the app ¯¥_(ツ)_/¯
Tools
Unity Profiler
Unity Profiler | Simple View
• Mono (used) — the size of Mono Heap
(the total sum of pink and green blocks)
• Mono (total) — the total committed memory for Mono Heap
(the total size of pink, green and blue blocks)
• GfxDriver — the total size of 2D textures, excluding render targets
• FMOD — the total size of memory requested by FMOD (audio)
• Other values should be ignored:
• Total doesn’t include the size of game binaries, libs, frameworks, native plugins
• GfxDriver doesn’t include a lot of other allocations done by the Graphics Driver
• The Profiler only sees allocations done by Unity code
Unity Profiler
Unity Profiler | Detailed View
• Shows named objects in Native Memory and which objects reference them
• Assets folder shows how much Native Memory assets take
Unity Profiler
Unity Profiler
• Many large sounds
• Probably duplicated
textures (have identical
names)
MemoryProfiler
MemoryProfiler | BitBucket
• Shows a combination of:
• Assets (Virtual Memory),
• Assets (GPU)
• Managed objects (Mono),
• Object references
• Easy to see relative sizes
https://bitbucket.org/Unity-Technologies/memoryprofiler
MemoryProfiler
MemoryProfiler | BitBucket
https://bitbucket.org/Unity-Technologies/memoryprofiler
MemoryProfiler
Array of strings
An object in Mono Heap
with its content listed
MemoryProfiler Extension
MemoryProfiler Extension | Github
• We can see Mono Heap
• Total size: 256KB + 256KB + 128KB = 640KB
• Used: 86.5KB.
https://github.com/robertoardila/support-unity-memoryprofiler
MemoryProfiler Ext
Block 1
Block 2
Block 3
Xcode Debug View
• Available in Xcode Debug Navigator view
• Shows if the app is doing OK memory wise
• Seems to be approximately Dirty Memory + Swapped Memory
• For detailed profiling should use Instruments
VM Tracker Instrument
VM Tracker
(1) Total for the app
1. Total memory consumption:
a. The app has allocated 1GB of VM
b. It has committed 351MB (186+165)
c. But iOS has swapped 165MB
d. Now it is 186MB Physical Memory
e. 118MB of which is Dirty Memory
2. Binaries, libs and frameworks
a. They take Resident Memory
b. But they are not Dirty (i.e., Clean)
(2) Binaries and libs
(a)(c)(d) (e)
(a) (b)
VM Tracker
(3) Graphics Driver
1. *All* — all allocations
2. *Dirty* — all Dirty allocations
3. IOKit — Graphics Driver
4. VM_ALLOCATE — Mono allocations + Heap
5. MALLOC_* — Malloc Heap
6. __TEXT + __LINKEDIT — app and lib binaries
7. __DATA — writable executable data
8. Perf. tool data — Instruments overhead
(4) Mono Heap
VM Tracker
Allocations Instrument
Allocations Instrument
Loading Thread
A Scene is loading
FMOD Initializes
Unity Allocates
Memory for the Audio
Total Allocated
Memory
Allocations
Allocations Instrument
An Asset Bundle is being loaded
A Class metadata is initialized
Allocations
Allocations
Example | Parsing JSON
1. Load and parse a 350KB JSON file
2. GC.Collect()
3. 8x GC.Collect()
iPhone 6, iOS 11.3
Unity 2018.1
Step 0: Initial State
Different tools showing the same data:
1. Unity Profiler shows 0.5MB committed but 364KB used
2. VM Tracker shows 1.25MB of allocations (in 3 blocks), 0.5MB of which is Mono Heap
3. Allocations Instrument shows each separate allocation (note the Category)
Unity Profiler
VM Tracker
Allocations
Step 0: Initial State
Allocations Instrument shows call stack for all allocations:
1. The first 4 allocations were done during IL2CPP initialization
2. The 5th allocation was done when creating a managed object
(1)
(2)
Allocations
Step 0: Initial State
Block 1
• Two blocks of Mono Heap
• Total size of Managed objects: 58KB
• Notice the fragmentation
Block 2
Unity Profiler
MemoryProfiler Ext
Step 1: Parsing JSON
1. Notice how expensive the operation was
2. Total memory allocated during the process: 5.6MB
3. But Mono Heap size hasn’t increased that much
4. Because GC has run a few times to reclaim it
(1) CPU Time
(2) Total Memory Allocated
(3) Mono Heap Size(4) Garbage Collector
Unity Profiler
Unity Profiler
Step 1: Parsing JSON
• Allocations Instrument shows new allocations
• The same allocated blocks can be seen in VM Tracker
• Notice that allocations (2) and (3) are in the same block
• Mono Heap takes ~4MB of Virtual Memory, all of it is Dirty
(1)
(1)
(2)
(2+3)
(3)
(4)
(4)
Allocations
VM Tracker
Step 1: Parsing JSON
Look at the sizes of the new allocs:
• 1.75MB ~= 2 x 960KB
• 960KB ~= 2 x 528KB
• 528KB ~= 2 x 256KB
• 256KB
StringBuilder is expanding
its reserved memory
Allocations
MemoryProfiler Ext
Mono Heap
Committed: 4.0MB
Heap Size: 3.3MB
Used: 1.0MB
Step 2: GC.Collect()
1. Mono Heap size, was: 3.0MB, now: 2.0MB
2. Allocated Mono memory — no change
3. Virtual Machine still has the same amount of committed memory
4. Some of it is compressed
(1) Mono Heap Size
Unity Profiler
VM Tracker
(2) Mono
(3) Mono (4) Compressed
Step 3: GC.Collect() x8
1. 8x GC.Collect() calls is expensive
2. Unity Profiler shows that the reserved Mono Heap size has decreased
Unity Profiler
Unity Profiler
(2) Mono Reserved
(1) CPU time spent
Step 3: GC.Collect() x8
1. Two committed blocks were released
2. They still reserve Virtual Memory but don’t contribute to Resident Memory
(1) Released blocks
VM Tracker
Allocations
(2) Blocks are not Resident
Understanding Memory on iOS
http://bit.ly/ios-memory
Detailed document with much more info.
Valentin Simonov
Field Engineer
Unity Technologies
val@unity3d.com
valyard

More Related Content

What's hot

【Unite Tokyo 2019】今すぐ現場で覚えておきたい最適化技法 ~「ゲシュタルト・オーディン」開発における最適化事例~
【Unite Tokyo 2019】今すぐ現場で覚えておきたい最適化技法 ~「ゲシュタルト・オーディン」開発における最適化事例~【Unite Tokyo 2019】今すぐ現場で覚えておきたい最適化技法 ~「ゲシュタルト・オーディン」開発における最適化事例~
【Unite Tokyo 2019】今すぐ現場で覚えておきたい最適化技法 ~「ゲシュタルト・オーディン」開発における最適化事例~UnityTechnologiesJapan002
 
UniTask入門
UniTask入門UniTask入門
UniTask入門torisoup
 
【Unity道場】物理シミュレーション完全マスター
【Unity道場】物理シミュレーション完全マスター【Unity道場】物理シミュレーション完全マスター
【Unity道場】物理シミュレーション完全マスターUnity Technologies Japan K.K.
 
大規模ゲーム開発における build 高速化と安定化
大規模ゲーム開発における build 高速化と安定化大規模ゲーム開発における build 高速化と安定化
大規模ゲーム開発における build 高速化と安定化DeNA
 
年の瀬リアルタイム通信サーバ勉強会
年の瀬リアルタイム通信サーバ勉強会年の瀬リアルタイム通信サーバ勉強会
年の瀬リアルタイム通信サーバ勉強会モノビット エンジン
 
UnrealBuildTool勉強会まとめ
UnrealBuildTool勉強会まとめUnrealBuildTool勉強会まとめ
UnrealBuildTool勉強会まとめShun Sasaki
 
【Unite 2017 Tokyo】「オルタナティブガールズ」〜50cmの距離感で3D美少女を最高にかわいく魅せる方法〜
【Unite 2017 Tokyo】「オルタナティブガールズ」〜50cmの距離感で3D美少女を最高にかわいく魅せる方法〜【Unite 2017 Tokyo】「オルタナティブガールズ」〜50cmの距離感で3D美少女を最高にかわいく魅せる方法〜
【Unite 2017 Tokyo】「オルタナティブガールズ」〜50cmの距離感で3D美少女を最高にかわいく魅せる方法〜Unite2017Tokyo
 
Unityネイティブプラグインマニアクス #denatechcon
Unityネイティブプラグインマニアクス #denatechconUnityネイティブプラグインマニアクス #denatechcon
Unityネイティブプラグインマニアクス #denatechconDeNA
 
【Unite Tokyo 2019】運用中超大規模タイトルにおけるUnityアップデート課題の解決手法と事例
【Unite Tokyo 2019】運用中超大規模タイトルにおけるUnityアップデート課題の解決手法と事例【Unite Tokyo 2019】運用中超大規模タイトルにおけるUnityアップデート課題の解決手法と事例
【Unite Tokyo 2019】運用中超大規模タイトルにおけるUnityアップデート課題の解決手法と事例UnityTechnologiesJapan002
 
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテストゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテストKLab Inc. / Tech
 

What's hot (20)

【Unite Tokyo 2019】今すぐ現場で覚えておきたい最適化技法 ~「ゲシュタルト・オーディン」開発における最適化事例~
【Unite Tokyo 2019】今すぐ現場で覚えておきたい最適化技法 ~「ゲシュタルト・オーディン」開発における最適化事例~【Unite Tokyo 2019】今すぐ現場で覚えておきたい最適化技法 ~「ゲシュタルト・オーディン」開発における最適化事例~
【Unite Tokyo 2019】今すぐ現場で覚えておきたい最適化技法 ~「ゲシュタルト・オーディン」開発における最適化事例~
 
UniTask入門
UniTask入門UniTask入門
UniTask入門
 
【Unity道場】物理シミュレーション完全マスター
【Unity道場】物理シミュレーション完全マスター【Unity道場】物理シミュレーション完全マスター
【Unity道場】物理シミュレーション完全マスター
 
実行速度の最適化のあれこれ プラス おまけ
実行速度の最適化のあれこれ プラス おまけ  実行速度の最適化のあれこれ プラス おまけ
実行速度の最適化のあれこれ プラス おまけ
 
大規模ゲーム開発における build 高速化と安定化
大規模ゲーム開発における build 高速化と安定化大規模ゲーム開発における build 高速化と安定化
大規模ゲーム開発における build 高速化と安定化
 
猫でも分かるUMG
猫でも分かるUMG猫でも分かるUMG
猫でも分かるUMG
 
[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)
[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)
[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)
 
年の瀬リアルタイム通信サーバ勉強会
年の瀬リアルタイム通信サーバ勉強会年の瀬リアルタイム通信サーバ勉強会
年の瀬リアルタイム通信サーバ勉強会
 
UnrealBuildTool勉強会まとめ
UnrealBuildTool勉強会まとめUnrealBuildTool勉強会まとめ
UnrealBuildTool勉強会まとめ
 
【Unite 2017 Tokyo】「オルタナティブガールズ」〜50cmの距離感で3D美少女を最高にかわいく魅せる方法〜
【Unite 2017 Tokyo】「オルタナティブガールズ」〜50cmの距離感で3D美少女を最高にかわいく魅せる方法〜【Unite 2017 Tokyo】「オルタナティブガールズ」〜50cmの距離感で3D美少女を最高にかわいく魅せる方法〜
【Unite 2017 Tokyo】「オルタナティブガールズ」〜50cmの距離感で3D美少女を最高にかわいく魅せる方法〜
 
60fpsアクションを実現する秘訣を伝授 解析編
60fpsアクションを実現する秘訣を伝授 解析編60fpsアクションを実現する秘訣を伝授 解析編
60fpsアクションを実現する秘訣を伝授 解析編
 
Unityネイティブプラグインマニアクス #denatechcon
Unityネイティブプラグインマニアクス #denatechconUnityネイティブプラグインマニアクス #denatechcon
Unityネイティブプラグインマニアクス #denatechcon
 
猫でも分かるUE4を使った VRコンテンツ開発 超入門編 2021
猫でも分かるUE4を使った VRコンテンツ開発 超入門編 2021猫でも分かるUE4を使った VRコンテンツ開発 超入門編 2021
猫でも分かるUE4を使った VRコンテンツ開発 超入門編 2021
 
【Unite Tokyo 2019】運用中超大規模タイトルにおけるUnityアップデート課題の解決手法と事例
【Unite Tokyo 2019】運用中超大規模タイトルにおけるUnityアップデート課題の解決手法と事例【Unite Tokyo 2019】運用中超大規模タイトルにおけるUnityアップデート課題の解決手法と事例
【Unite Tokyo 2019】運用中超大規模タイトルにおけるUnityアップデート課題の解決手法と事例
 
Unreal Engine 4.27 ノンゲーム向け新機能まとめ
Unreal Engine 4.27 ノンゲーム向け新機能まとめUnreal Engine 4.27 ノンゲーム向け新機能まとめ
Unreal Engine 4.27 ノンゲーム向け新機能まとめ
 
Fortniteを支える技術
Fortniteを支える技術Fortniteを支える技術
Fortniteを支える技術
 
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテストゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
 
猫でも分かるUE4を使ったARコンテンツ作り方 初級編 ver 1.0.0
猫でも分かるUE4を使ったARコンテンツ作り方 初級編 ver 1.0.0猫でも分かるUE4を使ったARコンテンツ作り方 初級編 ver 1.0.0
猫でも分かるUE4を使ったARコンテンツ作り方 初級編 ver 1.0.0
 
猫でも分かるUE4のポストプロセスを使った演出・絵作り
猫でも分かるUE4のポストプロセスを使った演出・絵作り猫でも分かるUE4のポストプロセスを使った演出・絵作り
猫でも分かるUE4のポストプロセスを使った演出・絵作り
 
非同期ロード画面 Asynchronous Loading Screen
非同期ロード画面 Asynchronous Loading Screen非同期ロード画面 Asynchronous Loading Screen
非同期ロード画面 Asynchronous Loading Screen
 

Similar to 【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~

Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performanceCodemotion
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and PerformanceDevGAMM Conference
 
Memory management in Andoid
Memory management in AndoidMemory management in Andoid
Memory management in AndoidMonkop Inc
 
C++ Advanced Memory Management With Allocators
C++ Advanced Memory Management With AllocatorsC++ Advanced Memory Management With Allocators
C++ Advanced Memory Management With AllocatorsGlobalLogic Ukraine
 
[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in UnityWilliam Hugo Yang
 
Us 18-chen-keen lab-ios-jailbreak-internals
Us 18-chen-keen lab-ios-jailbreak-internalsUs 18-chen-keen lab-ios-jailbreak-internals
Us 18-chen-keen lab-ios-jailbreak-internalsLiang Chen
 
KeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be Dangerous
KeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be DangerousKeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be Dangerous
KeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be DangerousPriyanka Aash
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Yossi Elkrief
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)MongoDB
 
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...Kuniyasu Suzaki
 
3. basic organization of a computer
3. basic organization of a computer3. basic organization of a computer
3. basic organization of a computerSHIKHA GAUTAM
 
.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4aminmesbahi
 
Why is my mac running slow?
Why is my mac running slow?Why is my mac running slow?
Why is my mac running slow?mohapps2014
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1rohassanie
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment StrategiesMongoDB
 
Practical guide to optimization in Unity
Practical guide to optimization in UnityPractical guide to optimization in Unity
Practical guide to optimization in UnityDevGAMM Conference
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment StrategyMongoDB
 
Linux Memory Management with CMA (Contiguous Memory Allocator)
Linux Memory Management with CMA (Contiguous Memory Allocator)Linux Memory Management with CMA (Contiguous Memory Allocator)
Linux Memory Management with CMA (Contiguous Memory Allocator)Pankaj Suryawanshi
 

Similar to 【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~ (20)

Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performance
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
 
Memory management in Andoid
Memory management in AndoidMemory management in Andoid
Memory management in Andoid
 
C++ Advanced Memory Management With Allocators
C++ Advanced Memory Management With AllocatorsC++ Advanced Memory Management With Allocators
C++ Advanced Memory Management With Allocators
 
[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity
 
Us 18-chen-keen lab-ios-jailbreak-internals
Us 18-chen-keen lab-ios-jailbreak-internalsUs 18-chen-keen lab-ios-jailbreak-internals
Us 18-chen-keen lab-ios-jailbreak-internals
 
KeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be Dangerous
KeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be DangerousKeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be Dangerous
KeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be Dangerous
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Android Memory , Where is all My RAM
Android Memory , Where is all My RAM
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)
 
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
 
3. basic organization of a computer
3. basic organization of a computer3. basic organization of a computer
3. basic organization of a computer
 
.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4
 
Why is my mac running slow?
Why is my mac running slow?Why is my mac running slow?
Why is my mac running slow?
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
 
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3DFrom Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment Strategies
 
Practical guide to optimization in Unity
Practical guide to optimization in UnityPractical guide to optimization in Unity
Practical guide to optimization in Unity
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
 
Deployment
DeploymentDeployment
Deployment
 
Linux Memory Management with CMA (Contiguous Memory Allocator)
Linux Memory Management with CMA (Contiguous Memory Allocator)Linux Memory Management with CMA (Contiguous Memory Allocator)
Linux Memory Management with CMA (Contiguous Memory Allocator)
 

More from Unity Technologies Japan K.K.

建築革命、更に更に進化!便利さ向上【Unity Reflect ver 3.0 】
建築革命、更に更に進化!便利さ向上【Unity Reflect ver 3.0 】建築革命、更に更に進化!便利さ向上【Unity Reflect ver 3.0 】
建築革命、更に更に進化!便利さ向上【Unity Reflect ver 3.0 】Unity Technologies Japan K.K.
 
UnityのクラッシュをBacktraceでデバッグしよう!
UnityのクラッシュをBacktraceでデバッグしよう!UnityのクラッシュをBacktraceでデバッグしよう!
UnityのクラッシュをBacktraceでデバッグしよう!Unity Technologies Japan K.K.
 
Unityで始めるバーチャルプロダクション
Unityで始めるバーチャルプロダクションUnityで始めるバーチャルプロダクション
Unityで始めるバーチャルプロダクションUnity Technologies Japan K.K.
 
ビジュアルスクリプティング (旧:Bolt) で始めるUnity入門3日目 ゲームをカスタマイズしよう
ビジュアルスクリプティング (旧:Bolt) で始めるUnity入門3日目 ゲームをカスタマイズしようビジュアルスクリプティング (旧:Bolt) で始めるUnity入門3日目 ゲームをカスタマイズしよう
ビジュアルスクリプティング (旧:Bolt) で始めるUnity入門3日目 ゲームをカスタマイズしようUnity Technologies Japan K.K.
 
ビジュアルスクリプティングで始めるUnity入門2日目 ゴールとスコアの仕組み - Unityステーション
ビジュアルスクリプティングで始めるUnity入門2日目 ゴールとスコアの仕組み - Unityステーションビジュアルスクリプティングで始めるUnity入門2日目 ゴールとスコアの仕組み - Unityステーション
ビジュアルスクリプティングで始めるUnity入門2日目 ゴールとスコアの仕組み - UnityステーションUnity Technologies Japan K.K.
 
ビジュアルスクリプティングで始めるUnity入門1日目 プレイヤーを動かそう
ビジュアルスクリプティングで始めるUnity入門1日目 プレイヤーを動かそうビジュアルスクリプティングで始めるUnity入門1日目 プレイヤーを動かそう
ビジュアルスクリプティングで始めるUnity入門1日目 プレイヤーを動かそうUnity Technologies Japan K.K.
 
PlasticSCMの活用テクニックをハンズオンで一緒に学ぼう!
PlasticSCMの活用テクニックをハンズオンで一緒に学ぼう!PlasticSCMの活用テクニックをハンズオンで一緒に学ぼう!
PlasticSCMの活用テクニックをハンズオンで一緒に学ぼう!Unity Technologies Japan K.K.
 
点群を使いこなせ! 可視化なんて当たり前、xRと点群を組み合わせたUnityの世界 【Interact , Stipple】
点群を使いこなせ! 可視化なんて当たり前、xRと点群を組み合わせたUnityの世界 【Interact , Stipple】点群を使いこなせ! 可視化なんて当たり前、xRと点群を組み合わせたUnityの世界 【Interact , Stipple】
点群を使いこなせ! 可視化なんて当たり前、xRと点群を組み合わせたUnityの世界 【Interact , Stipple】Unity Technologies Japan K.K.
 
Unity教える先生方注目!ティーチャートレーニングデイを体験しよう
Unity教える先生方注目!ティーチャートレーニングデイを体験しようUnity教える先生方注目!ティーチャートレーニングデイを体験しよう
Unity教える先生方注目!ティーチャートレーニングデイを体験しようUnity Technologies Japan K.K.
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発Unity Technologies Japan K.K.
 
FANTASIANの明日使えない特殊テクニック教えます
FANTASIANの明日使えない特殊テクニック教えますFANTASIANの明日使えない特殊テクニック教えます
FANTASIANの明日使えない特殊テクニック教えますUnity Technologies Japan K.K.
 
インディーゲーム開発の現状と未来 2021
インディーゲーム開発の現状と未来 2021インディーゲーム開発の現状と未来 2021
インディーゲーム開発の現状と未来 2021Unity Technologies Japan K.K.
 
建築革命、更に進化!デジタルツイン基盤の真打ち登場【概要編 Unity Reflect ver 2.1 】
建築革命、更に進化!デジタルツイン基盤の真打ち登場【概要編 Unity Reflect ver 2.1 】建築革命、更に進化!デジタルツイン基盤の真打ち登場【概要編 Unity Reflect ver 2.1 】
建築革命、更に進化!デジタルツイン基盤の真打ち登場【概要編 Unity Reflect ver 2.1 】Unity Technologies Japan K.K.
 
Burstを使ってSHA-256のハッシュ計算を高速に行う話
Burstを使ってSHA-256のハッシュ計算を高速に行う話Burstを使ってSHA-256のハッシュ計算を高速に行う話
Burstを使ってSHA-256のハッシュ計算を高速に行う話Unity Technologies Japan K.K.
 
Cinemachineで見下ろし視点のカメラを作る
Cinemachineで見下ろし視点のカメラを作るCinemachineで見下ろし視点のカメラを作る
Cinemachineで見下ろし視点のカメラを作るUnity Technologies Japan K.K.
 
Unityティーチャートレーニングデイ -認定プログラマー編-
Unityティーチャートレーニングデイ -認定プログラマー編-Unityティーチャートレーニングデイ -認定プログラマー編-
Unityティーチャートレーニングデイ -認定プログラマー編-Unity Technologies Japan K.K.
 
Unityティーチャートレーニングデイ -認定3Dアーティスト編-
Unityティーチャートレーニングデイ -認定3Dアーティスト編-Unityティーチャートレーニングデイ -認定3Dアーティスト編-
Unityティーチャートレーニングデイ -認定3Dアーティスト編-Unity Technologies Japan K.K.
 
Unityティーチャートレーニングデイ -認定アソシエイト編-
Unityティーチャートレーニングデイ -認定アソシエイト編-Unityティーチャートレーニングデイ -認定アソシエイト編-
Unityティーチャートレーニングデイ -認定アソシエイト編-Unity Technologies Japan K.K.
 

More from Unity Technologies Japan K.K. (20)

建築革命、更に更に進化!便利さ向上【Unity Reflect ver 3.0 】
建築革命、更に更に進化!便利さ向上【Unity Reflect ver 3.0 】建築革命、更に更に進化!便利さ向上【Unity Reflect ver 3.0 】
建築革命、更に更に進化!便利さ向上【Unity Reflect ver 3.0 】
 
UnityのクラッシュをBacktraceでデバッグしよう!
UnityのクラッシュをBacktraceでデバッグしよう!UnityのクラッシュをBacktraceでデバッグしよう!
UnityのクラッシュをBacktraceでデバッグしよう!
 
Unityで始めるバーチャルプロダクション
Unityで始めるバーチャルプロダクションUnityで始めるバーチャルプロダクション
Unityで始めるバーチャルプロダクション
 
ビジュアルスクリプティング (旧:Bolt) で始めるUnity入門3日目 ゲームをカスタマイズしよう
ビジュアルスクリプティング (旧:Bolt) で始めるUnity入門3日目 ゲームをカスタマイズしようビジュアルスクリプティング (旧:Bolt) で始めるUnity入門3日目 ゲームをカスタマイズしよう
ビジュアルスクリプティング (旧:Bolt) で始めるUnity入門3日目 ゲームをカスタマイズしよう
 
ビジュアルスクリプティングで始めるUnity入門2日目 ゴールとスコアの仕組み - Unityステーション
ビジュアルスクリプティングで始めるUnity入門2日目 ゴールとスコアの仕組み - Unityステーションビジュアルスクリプティングで始めるUnity入門2日目 ゴールとスコアの仕組み - Unityステーション
ビジュアルスクリプティングで始めるUnity入門2日目 ゴールとスコアの仕組み - Unityステーション
 
ビジュアルスクリプティングで始めるUnity入門1日目 プレイヤーを動かそう
ビジュアルスクリプティングで始めるUnity入門1日目 プレイヤーを動かそうビジュアルスクリプティングで始めるUnity入門1日目 プレイヤーを動かそう
ビジュアルスクリプティングで始めるUnity入門1日目 プレイヤーを動かそう
 
PlasticSCMの活用テクニックをハンズオンで一緒に学ぼう!
PlasticSCMの活用テクニックをハンズオンで一緒に学ぼう!PlasticSCMの活用テクニックをハンズオンで一緒に学ぼう!
PlasticSCMの活用テクニックをハンズオンで一緒に学ぼう!
 
点群を使いこなせ! 可視化なんて当たり前、xRと点群を組み合わせたUnityの世界 【Interact , Stipple】
点群を使いこなせ! 可視化なんて当たり前、xRと点群を組み合わせたUnityの世界 【Interact , Stipple】点群を使いこなせ! 可視化なんて当たり前、xRと点群を組み合わせたUnityの世界 【Interact , Stipple】
点群を使いこなせ! 可視化なんて当たり前、xRと点群を組み合わせたUnityの世界 【Interact , Stipple】
 
Unity教える先生方注目!ティーチャートレーニングデイを体験しよう
Unity教える先生方注目!ティーチャートレーニングデイを体験しようUnity教える先生方注目!ティーチャートレーニングデイを体験しよう
Unity教える先生方注目!ティーチャートレーニングデイを体験しよう
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発
 
FANTASIANの明日使えない特殊テクニック教えます
FANTASIANの明日使えない特殊テクニック教えますFANTASIANの明日使えない特殊テクニック教えます
FANTASIANの明日使えない特殊テクニック教えます
 
インディーゲーム開発の現状と未来 2021
インディーゲーム開発の現状と未来 2021インディーゲーム開発の現状と未来 2021
インディーゲーム開発の現状と未来 2021
 
建築革命、更に進化!デジタルツイン基盤の真打ち登場【概要編 Unity Reflect ver 2.1 】
建築革命、更に進化!デジタルツイン基盤の真打ち登場【概要編 Unity Reflect ver 2.1 】建築革命、更に進化!デジタルツイン基盤の真打ち登場【概要編 Unity Reflect ver 2.1 】
建築革命、更に進化!デジタルツイン基盤の真打ち登場【概要編 Unity Reflect ver 2.1 】
 
Burstを使ってSHA-256のハッシュ計算を高速に行う話
Burstを使ってSHA-256のハッシュ計算を高速に行う話Burstを使ってSHA-256のハッシュ計算を高速に行う話
Burstを使ってSHA-256のハッシュ計算を高速に行う話
 
Cinemachineで見下ろし視点のカメラを作る
Cinemachineで見下ろし視点のカメラを作るCinemachineで見下ろし視点のカメラを作る
Cinemachineで見下ろし視点のカメラを作る
 
徹底解説 Unity Reflect【開発編 ver2.0】
徹底解説 Unity Reflect【開発編 ver2.0】徹底解説 Unity Reflect【開発編 ver2.0】
徹底解説 Unity Reflect【開発編 ver2.0】
 
徹底解説 Unity Reflect【概要編 ver2.0】
徹底解説 Unity Reflect【概要編 ver2.0】徹底解説 Unity Reflect【概要編 ver2.0】
徹底解説 Unity Reflect【概要編 ver2.0】
 
Unityティーチャートレーニングデイ -認定プログラマー編-
Unityティーチャートレーニングデイ -認定プログラマー編-Unityティーチャートレーニングデイ -認定プログラマー編-
Unityティーチャートレーニングデイ -認定プログラマー編-
 
Unityティーチャートレーニングデイ -認定3Dアーティスト編-
Unityティーチャートレーニングデイ -認定3Dアーティスト編-Unityティーチャートレーニングデイ -認定3Dアーティスト編-
Unityティーチャートレーニングデイ -認定3Dアーティスト編-
 
Unityティーチャートレーニングデイ -認定アソシエイト編-
Unityティーチャートレーニングデイ -認定アソシエイト編-Unityティーチャートレーニングデイ -認定アソシエイト編-
Unityティーチャートレーニングデイ -認定アソシエイト編-
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~

  • 1. Valentin Simonov Field Engineer Unity Technologies val@unity3d.com valyard
  • 2. Understanding Memory on iOS • Partly applicable to other platforms • But needs testing
  • 3. No need to take pictures Detailed doc at the end* * yes, you will have to sit through the entire presentation
  • 4. How much memory does my game take?
  • 5. - How much memory does my game take? - What kind of memory? • Physical/Resident Memory • Graphics Memory • Virtual Memory • Malloc Heap • Dirty Memory • Native Memory • Mono Heap
  • 6. Physical Memory (RAM) • The total amount of memory on-chip • You can’t have more* * But Android users can... until it is mysteriously gone Physical Memory
  • 7. Virtual Memory (VM) • iOS apps don’t work with Physical Memory directly, they work with Virtual Memory • App’s private address space • Divided into Pages (4KB or 16KB) • Pages are mapped to Physical Memory by the OS PhysicalMemory Allocated Virtual Memory AvailableAddressSpace
  • 8. Resident Memory • An app can allocate a block of memory in Virtual Memory but not use it (”reserve”) • The app has to modify the allocated VM for the OS to map it to PM (”commit”) • Resident Memory is the total amount of Physical Memory used by the app at any moment PhysicalMemory Resident Memory AvailableAddressSpace reserved (not part of RM) committed (part of RM)
  • 9. Clean Memory and Dirty Memory • Clean Memory — read-only pages of Resident Memory which iOS can remove and reload • Dirty Memory — everything else in Resident Memory • Apps can share Clean Memory pages (like, system frameworks) PhysicalMemory AvailableAddressSpace Clean Dirty
  • 10. Clean Memory and Dirty Memory • Memory allocated for the following data is Clean (iOS can reload this from disk): • App’s binaries, static code segments, • memory-mapped files, • System frameworks and dynamic libraries, etc. PhysicalMemory AvailableAddressSpace Binaries Dirty
  • 11. Graphics Memory (VRAM) • iOS uses a Unified Memory Architecture — GPU and CPU share Physical Memory • Graphics Driver allocates Virtual Memory for its resources • Most of this is Resident and Dirty PhysicalMemory AvailableAddressSpace Graphics Memory Binaries Dirty
  • 12. Malloc Heap • A region of VM where the app can allocate memory using malloc and calloc functions • This is where Unity allocates all memory for its needs • The maximum size is unknown, but seems to be 2x Physical Memory PhysicalMemory Malloc Heap AvailableAddressSpace Graphics Memory Binaries
  • 13. Swapped (compressed) Memory • iOS doesn’t have a page file and can’t dump rarely used Virtual Memory pages to disk • But it can compress them and store in some other region of Physical Memory • SCM is a compressed part of the app’s Dirty Memory • The algorithm is unknown, but iOS usually tries to compress as much as it can PhysicalMemory Clean Not Compressed Dirty Memory Compressed Dirty Memory
  • 14. Native (Unity) Memory • Unity is a C++ engine with a .NET Virtual Machine • Native Memory — part of Malloc Heap (VM Region) used for all Unity’s allocations • All asset data is in Native Memory, exposed to C# as lightweight wrappers PhysicalMemory AvailableAddressSpace Native Memory Graphics Memory Binaries
  • 15. Native Plugins • Native plugins do their own allocations in Malloc Heap • Their code binaries are “Clean” PhysicalMemory AvailableAddressSpace Native Memory Graphics Memory Binaries Native Plugins
  • 16. Mono Heap • A part of Native Memory allocated for the needs of the .NET Virtual Machine • Contains all managed C# allocations, maintained by Garbage Collector PhysicalMemory AvailableAddressSpace Native Memory Graphics Memory Binaries Native Plugins Mono Heap
  • 17.
  • 18. Mono Heap Native Memory Managed Objects Unused Mono Heap ImaginationReality • Mono Heap is not a large contiguous region of Native Memory • It is allocated in blocks to store objects of similar size • There can be allocated, committed but unused blocks • If a block is still unused after 8 Garbage Collection passes, its Physical Memory will be returned to the system (decommitted) Block Block Almost empty block Block Allocated but unused block Allocated but unused block
  • 19. iOS Memory Management • iOS is a multitasking OS • Each app works with its own Virtual Memory address space mapped to Physical Memory
  • 20. iOS Memory Management • When the amount of free Physical Memory gets low, iOS starts trying to reduce memory pressure: 1. Removes Clean Memory pages (they can be safely reloaded later) 2. If the app takes too much Dirty Memory, iOS sends memory warnings 3. If the app fails to free resources, iOS terminates it • We don’t know the details about this algorithm • Sometimes an app can allocate more, sometimes less
  • 21. Minimize the Size of Dirty Memory! • Measure the app’s Dirty Memory and see if it grows over time, • Reduce the amount of objects contributing to Dirty Memory, • Note: some data can be compressed better. PhysicalMemory AvailableAddressSpace Native Memory Graphics Memory Binaries Native Plugins Mono Heap Dirty Memory
  • 22. Minimize the Size of Dirty Memory! • Reasonable limits of Dirty Memory: • 180Mb for 512Mb devices, • 360Mb for 1Gb devices, • 1.2Gb for 2Gb devices. • ... but, iOS can still kill the app ¯¥_(ツ)_/¯
  • 23. Tools
  • 25. Unity Profiler | Simple View • Mono (used) — the size of Mono Heap (the total sum of pink and green blocks) • Mono (total) — the total committed memory for Mono Heap (the total size of pink, green and blue blocks) • GfxDriver — the total size of 2D textures, excluding render targets • FMOD — the total size of memory requested by FMOD (audio) • Other values should be ignored: • Total doesn’t include the size of game binaries, libs, frameworks, native plugins • GfxDriver doesn’t include a lot of other allocations done by the Graphics Driver • The Profiler only sees allocations done by Unity code Unity Profiler
  • 26. Unity Profiler | Detailed View • Shows named objects in Native Memory and which objects reference them • Assets folder shows how much Native Memory assets take Unity Profiler Unity Profiler • Many large sounds • Probably duplicated textures (have identical names)
  • 28. MemoryProfiler | BitBucket • Shows a combination of: • Assets (Virtual Memory), • Assets (GPU) • Managed objects (Mono), • Object references • Easy to see relative sizes https://bitbucket.org/Unity-Technologies/memoryprofiler MemoryProfiler
  • 31. MemoryProfiler Extension | Github • We can see Mono Heap • Total size: 256KB + 256KB + 128KB = 640KB • Used: 86.5KB. https://github.com/robertoardila/support-unity-memoryprofiler MemoryProfiler Ext Block 1 Block 2 Block 3
  • 32. Xcode Debug View • Available in Xcode Debug Navigator view • Shows if the app is doing OK memory wise • Seems to be approximately Dirty Memory + Swapped Memory • For detailed profiling should use Instruments
  • 35. (1) Total for the app 1. Total memory consumption: a. The app has allocated 1GB of VM b. It has committed 351MB (186+165) c. But iOS has swapped 165MB d. Now it is 186MB Physical Memory e. 118MB of which is Dirty Memory 2. Binaries, libs and frameworks a. They take Resident Memory b. But they are not Dirty (i.e., Clean) (2) Binaries and libs (a)(c)(d) (e) (a) (b) VM Tracker
  • 36. (3) Graphics Driver 1. *All* — all allocations 2. *Dirty* — all Dirty allocations 3. IOKit — Graphics Driver 4. VM_ALLOCATE — Mono allocations + Heap 5. MALLOC_* — Malloc Heap 6. __TEXT + __LINKEDIT — app and lib binaries 7. __DATA — writable executable data 8. Perf. tool data — Instruments overhead (4) Mono Heap VM Tracker
  • 38. Allocations Instrument Loading Thread A Scene is loading FMOD Initializes Unity Allocates Memory for the Audio Total Allocated Memory Allocations
  • 39. Allocations Instrument An Asset Bundle is being loaded A Class metadata is initialized Allocations Allocations
  • 40. Example | Parsing JSON 1. Load and parse a 350KB JSON file 2. GC.Collect() 3. 8x GC.Collect() iPhone 6, iOS 11.3 Unity 2018.1
  • 41. Step 0: Initial State Different tools showing the same data: 1. Unity Profiler shows 0.5MB committed but 364KB used 2. VM Tracker shows 1.25MB of allocations (in 3 blocks), 0.5MB of which is Mono Heap 3. Allocations Instrument shows each separate allocation (note the Category) Unity Profiler VM Tracker Allocations
  • 42. Step 0: Initial State Allocations Instrument shows call stack for all allocations: 1. The first 4 allocations were done during IL2CPP initialization 2. The 5th allocation was done when creating a managed object (1) (2) Allocations
  • 43. Step 0: Initial State Block 1 • Two blocks of Mono Heap • Total size of Managed objects: 58KB • Notice the fragmentation Block 2 Unity Profiler MemoryProfiler Ext
  • 44. Step 1: Parsing JSON 1. Notice how expensive the operation was 2. Total memory allocated during the process: 5.6MB 3. But Mono Heap size hasn’t increased that much 4. Because GC has run a few times to reclaim it (1) CPU Time (2) Total Memory Allocated (3) Mono Heap Size(4) Garbage Collector Unity Profiler Unity Profiler
  • 45. Step 1: Parsing JSON • Allocations Instrument shows new allocations • The same allocated blocks can be seen in VM Tracker • Notice that allocations (2) and (3) are in the same block • Mono Heap takes ~4MB of Virtual Memory, all of it is Dirty (1) (1) (2) (2+3) (3) (4) (4) Allocations VM Tracker
  • 46. Step 1: Parsing JSON Look at the sizes of the new allocs: • 1.75MB ~= 2 x 960KB • 960KB ~= 2 x 528KB • 528KB ~= 2 x 256KB • 256KB StringBuilder is expanding its reserved memory Allocations
  • 47. MemoryProfiler Ext Mono Heap Committed: 4.0MB Heap Size: 3.3MB Used: 1.0MB
  • 48. Step 2: GC.Collect() 1. Mono Heap size, was: 3.0MB, now: 2.0MB 2. Allocated Mono memory — no change 3. Virtual Machine still has the same amount of committed memory 4. Some of it is compressed (1) Mono Heap Size Unity Profiler VM Tracker (2) Mono (3) Mono (4) Compressed
  • 49. Step 3: GC.Collect() x8 1. 8x GC.Collect() calls is expensive 2. Unity Profiler shows that the reserved Mono Heap size has decreased Unity Profiler Unity Profiler (2) Mono Reserved (1) CPU time spent
  • 50. Step 3: GC.Collect() x8 1. Two committed blocks were released 2. They still reserve Virtual Memory but don’t contribute to Resident Memory (1) Released blocks VM Tracker Allocations (2) Blocks are not Resident
  • 51. Understanding Memory on iOS http://bit.ly/ios-memory Detailed document with much more info. Valentin Simonov Field Engineer Unity Technologies val@unity3d.com valyard