Interlocked Singly Linked List

Server/Multithreading

[Object Pool] SList를 사용한 Object Pool 구현(2)

SList(Interlocked Singly Linked List)를 활용하여 Object Pool을 구현해봤다. Poolable Object Pool을 통해 관리할 객체들은 Poolable 클래스를 상속받아야 한다. Poolable 객체는 Object Pool에 의해 관리된다. operator new와 delete를 오버로딩하여 object pool을 사용한 할당과 해제방식으로 변경했다. new 연산자에서는 object pool에서 객체를 하나 꺼내오고, delete 연산자에서는 object pool에 사용한 객체를 넣는다. Object Pool Object Pool은 SList를 통해 구현했다. Push는 리스트에 Poolable 객체를 넣는 메소드다. InterlockedPushEntrySList ..

Tuesberry
'Interlocked Singly Linked List' 태그의 글 목록