| 308 | } |
| 309 | |
| 310 | void PushItem(LIST_ENTRY* entry) { |
| 311 | AutoLock<FastMutex> lock(g_SysMonGlobals.Mutex); |
| 312 | if (g_SysMonGlobals.ItemCount > 1024) { |
| 313 | // too many items,remove oldest one |
| 314 | auto head = RemoveHeadList(&g_SysMonGlobals.ItemHead); |
| 315 | g_SysMonGlobals.ItemCount--; |
| 316 | auto item = CONTAINING_RECORD(head, FullItem<ItemHeader>, Entry); |
| 317 | ExFreePool(item); |
| 318 | } |
| 319 | InsertTailList(&g_SysMonGlobals.ItemHead, entry); |
| 320 | g_SysMonGlobals.ItemCount++; |
| 321 | } |
| 322 | |
| 323 | LOGICAL |
| 324 | ExFastRefAddAdditionalReferenceCounts( |
no test coverage detected