MCPcopy Create free account
hub / github.com/a2flo/floor / pin

Method pin

include/floor/core/aligned_ptr.hpp:180–191  ·  view source on GitHub ↗

page-locks/pins the memory

Source from the content-addressed store, hash-verified

178
179 //! page-locks/pins the memory
180 bool pin() {
181#if !defined(__WINDOWS__)
182 if (mlock(ptr, size) == 0)
183#else
184 if (VirtualLock(ptr, size) != 0)
185#endif
186 {
187 pinned = true;
188 return true;
189 }
190 return false;
191 }
192
193 //! unlocks/unpins the memory again
194 bool unpin() {

Callers 2

map_memoryFunction · 0.80
instantiateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected