Skip to content

Commit 3bb0366

Browse files
author
qufei
committed
Nodejs 内存管理
1 parent a1dea20 commit 3bb0366

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/nodejs/memory.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ Mark-Sweep 处理时分为标记、清除两个步骤,与 Scavenge 算法只
237237

238238
### 闭包
239239

240+
### 慎将内存做为缓存
241+
242+
通过内存来做缓存这可能是我们想到的最快的实现方式,另外业务中缓存还是很常用的,但是了解了 Node.js 中的内存模型和垃圾回收机制之后在使用的时候就要谨慎了,为什么呢?缓存中存储的键越多,长期存活的对象也就越多垃圾回收的这些
240243

241244
## 内存检测工具
242245

0 commit comments

Comments
 (0)