polarsslthreadlock: #include the proper memory and debug includes

Pointed out by Steve Holme