mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 09:28:14 +00:00
feat(shm): arena + ContextPolicy(§13.2/§13.8)
- unified.go: arena 分配器 (alloc/write/read/reset) - NewHost: 分配空间含 arena - SDK ToolDef 加 ContextPolicy string - StageAfterToolcall 后检查 prune 策略触发 RelevanceContext.Prune
This commit is contained in:
@ -53,7 +53,7 @@ type Host struct {
|
||||
// (实验 2 已验证各进程 mmap 到不同虚拟地址时偏移解引用仍正确)。
|
||||
func NewHost() (*Host, error) {
|
||||
// 统一区域大小:SuperBlock + StageContext segment + EvtRing segment
|
||||
unifiedSize := superBlockSize + shmDefaultSize + evtTotalSize
|
||||
unifiedSize := superBlockSize + shmDefaultSize + evtTotalSize + unifiedArenaSize
|
||||
memfd, data, err := allocShm(unifiedSize)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user