c24165b8bc
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게 [공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류. 문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인). - Topic_Programming → Domain_Programming (내부 구조 보존) - Topic_Graphic → Domain_Design - Topic_Business → Domain_Product - Topic_General → Domain_General - _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning), Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing) - 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서) - 빈 폴더 정리 (memory/procedures) - 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4.3 KiB
4.3 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-scavenge | Scavenge | 10_Wiki/Topics | verified | self |
|
none | A | 0.95 | applied |
|
2026-05-10 | pending |
|
Scavenge
매 한 줄
"매 young object 의 매 빠른 die — 매 cheap 하게 collect". Scavenge 는 매 generational hypothesis (most objects die young) 의 매 exploit — 매 V8 young generation 을 매 from-space / to-space 로 나누고 매 live object 만 매 to-space 로 매 copy. 매 dead object 는 매 단순 abandon. 2026 V8 (Orinoco) 에서 매 parallel + concurrent 로 매 main-thread pause < 1ms.
매 핵심
매 Cheney's algorithm
- Allocate in to-space (linear bump pointer).
- When full → 매 swap roles. From-space = 매 old to-space.
- From roots, copy 매 reachable object to (new) to-space.
- Update 매 forwarding pointer in from-space slot.
- BFS through copied objects, copying 매 referenced objects.
- Done → from-space 매 entirely abandoned.
매 V8-specific
- Young gen = New Space ≈ 1–8 MB per worker.
- Promotion: 매 survives 2 scavenges → 매 Old Space.
- Parallel Scavenge (2018+): 매 multiple threads.
- Concurrent (2021+): root marking on background.
매 응용
- JS heap young gen.
- Java HotSpot Young Generation (Parallel Scavenge collector).
- .NET Gen 0/1.
- Erlang per-process heap.
💻 패턴
Cheney scavenge (pseudo-C)
typedef struct { intptr_t header; void* slots[]; } Object;
char *from, *to, *alloc;
void* scavenge_copy(Object *obj) {
if (is_forwarded(obj)) return forwarded_addr(obj);
size_t size = obj_size(obj);
Object *copy = (Object*)alloc;
memcpy(copy, obj, size);
alloc += size;
set_forwarded(obj, copy);
return copy;
}
void scavenge() {
swap(&from, &to);
alloc = to;
char *scan = to;
for (Root *r = roots; r; r = r->next) *r = scavenge_copy(*r);
while (scan < alloc) {
Object *o = (Object*)scan;
for (int i = 0; i < slot_count(o); i++)
o->slots[i] = scavenge_copy(o->slots[i]);
scan += obj_size(o);
}
}
Allocation (bump pointer)
void* alloc_young(size_t bytes) {
if (alloc + bytes > to_end) trigger_scavenge();
void *p = alloc;
alloc += bytes;
return p;
}
Promotion check
if (obj_age(o) >= 2) {
void *promoted = alloc_old(obj_size(o));
memcpy(promoted, o, obj_size(o));
// also update remembered set if old → young pointers exist
} else {
scavenge_copy(o);
inc_age(o);
}
Remembered set (write barrier)
void store_field(Object *obj, int slot, Object *val) {
obj->slots[slot] = val;
if (in_old_space(obj) && in_young_space(val))
remembered_set_add(&obj->slots[slot]);
}
V8 trace (observe scavenge)
node --trace-gc app.js
# [12345:0x...] 100 ms: Scavenge 5.5 (6.7) -> 4.8 (7.7) MB, 0.4 / 0.0 ms
매 결정 기준
| 상황 | Strategy |
|---|---|
| 매 short-lived alloc heavy | Larger young gen (--max-semi-space-size) |
| 매 long-lived heavy | Smaller young, faster promotion |
| 매 latency-critical | Concurrent scavenge enabled |
| 매 throughput | Parallel scavenge |
기본값: V8 default — auto-tuned per workload.
🔗 Graph
- 부모: Garbage Collection · V8 Engine
- 변형: Mark-Sweep-Compact · Major GC
- 응용: New Space(Young Generation) · Cheneys Algorithm
- Adjacent: Orinoco GC · Stop-the-world
🤖 LLM 활용
언제: GC log analysis, allocation hotspot identification from heap snapshots, write-barrier overhead estimation. 언제 X: 매 actual GC algorithm change — runtime team only.
❌ 안티패턴
- Massive young alloc + immediate retain: 매 promotion storm → 매 old space pressure.
- Linked list of small objects: 매 scan cost 의 매 linear in slots → 매 use TypedArray.
- Disabling GC: 매 --no-gc — 매 memory grows unbounded.
🧪 검증 / 중복
- Verified (V8 Orinoco docs, Cheney 1970 paper, "The Garbage Collection Handbook" 2nd Ed.).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — Cheney + V8 Orinoco parallel-concurrent state |