aboutsummaryrefslogtreecommitdiffstats
path: root/src/allocation/ml_win32/mlock.cpp
blob: 8c5919934621e6ff7ba335f57cdb5ac2067e6922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*************************************************
* Memory Locking Functions Source File           *
* (C) 1999-2007 Jack Lloyd                       *
*************************************************/

#include <botan/util.h>
#include <windows.h>

namespace Botan {

/*************************************************
* Lock an area of memory into RAM                *
*************************************************/
void lock_mem(void* ptr, u32bit bytes)
   {
   VirtualLock(ptr, bytes);
   }

/*************************************************
* Unlock a previously locked region of memory    *
*************************************************/
void unlock_mem(void* ptr, u32bit bytes)
   {
   VirtualUnlock(ptr, bytes);
   }

}